.PN1 L....................................................................A .FO2 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA>@@ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ UNOTE 005‰ Page # of 1 L....T..T.....................................R.L....................A ‰ ‰ Ref: UNOTE 005~ From‰:‰ Customer Services~ 18 Mar 1988~ Re‰ :‰ Complex multi-table update in USQL~ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA>@@ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ L.......T.......T.......T.......T.......T.......T.......T.......T....R QUERY I have 2 tables in a database and want to update one table based on data in the other. eg: table1 table2 col1 col2 col1 col2 col3 I want to do something like: "update col1 in table2 with contents of col1 in table1 where col2 is the same in both tables" ANSWER The following USQL statement will do the job: update table2 set col1 = -~@@ AAAAAAAAAAAAAAAAAAAAAAAAAA (select col1 from table 1 where table1.col2 = table2.col2) -~@@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA where col2 in (select col2 from table1)~@@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA