Firebird / IBX
I want to copy an entry of a table and change ONE value of it. This is harder, than I thought. At least for me.
The working select statement for this entry reads
name_, FK_KONTRAKT,
Entry_price,
exit_Price, Entry_Signal, Entry_Typ, Exit_Signal, Exit_Typ,
Position_, entry_date, entry_Time, exit_date, exit_time,
Status_, comm, stop, target, best, worst, PL,
Ergebnis, Margin, zuKonto
What whall be changed is the value "zuKonto"
Within a method I prepared these 2 lines:
IBQueryGeneric.ParamByName('zuKonto').AsInteger:=kto_;
IBQueryGeneric.ParamByName('id').AsInteger:=id_;
There may be 2 ways to solve it:
1)
copy it and change only the value zuKonto in the copy data-entry. The challenge for me is to return the new primary key, which is "id_trade"
2) OR I can use the select statement to fill in new values into it by "INSERT". Unfortunately I do not know how to do select and set at the same time.
Thank you for hints.