Hi everyone, I'm back..
Need the correct syntax to update a field in one table getting data from a field in another table.
Problem is the tables must be joined on two fields..
This is what I do:
begin work;
update bksyp
set ekptp=(select discount.discount from discount
where bksyp.isbne=discount.isbne and
bksyp.ypkod=discount.ypkod)
where
(bksyp.isbne in (select discount.isbne from discount) and
bksyp.ypkod in (select discount.ypkod from discount))
;
This updates more records than needed..
There must be something wrong in the last part I believe.
Thanx.