Possible Duplicate:
Oracle - Update statement with inner join
In SQL Server Developer Edition, I want to update a column with its own value and variable from another table.
In table sa_tran_item
, ref_no6
field is showing "NYN"
and other table apo_rms_i_item_place
, SORTIMENTSGRUPP_KOD
field showing 10
I want to update table sa_tran_item
, ref_no6
field as "NYN10"
My query
UPDATE sa_tran_item
SET ref_no6 = "ref_no6" + "a.SORTIMENTSGRUPP_KOD"
FROM apo_rms_i_item_place a, sa_tran_item
WHERE a.varnummer in (select item from item_master where item_number_type='MANL' and PRIMARY_REF_ITEM_IND = 'Y' and item_parent in
(select ITEM from sa_tran_item where error_ind = 'Y' and tran_seq_no in
(select tran_seq_no from sa_error where tran_seq_in ='49910349001' error_code like 'ACG_NOT_FOUND') ));