I'm using IQMS Data Dictionary and I'm trying to change a value on one table to reflect the value on another table.
update fgmulti as t1
set t1.recv_default=t2.cuser6
inner join arinvt as t2 on t1.arinvt_id=t2.id
where t1.loc_id='27053'
and t2.cuser6='Y'
I've tried to move the Set command line around like:
update fgmulti as t1
inner join arinvt as t2 on t1.arinvt_id=t2.id
set t1.recv_default=t2.cuser6
where t1.loc_id='27053'
and t2.cuser6='Y'
I'm still getting the error of a missing Set Keyword.
What am I doing wrong?
So I tried many of the examples from the linked question that was similar to this one. Below is one example, but now I'm getting another error. I've verified that this is an actual value on our database.
ORA-00904: "TABLE2"."VALUE": invalid identifier
Update table1 a Set a.DEFAULT= (Select table2.VALUE
from table2 b
where a.table2id=b.id)
Where a.LOCATION = '27053'
and exists (select b.VALUE
from b
where a.table2id=b.id)