Informix supports 2 different styles for the update - your one would have to 
be written :


UPDATE djp SET(col1, col2) = ((SELECT col1,col2 FROM some_other_table))

Notice the double brackets !
The first signifies a list of values - the second is the brackets around the 
subquery...

(NB If you try to reference the same table in the Update - you'll get an 
error....)


For single columns you could still write :

UPDATE djp SET col1 = (SELECT col2 FROM some_other_table)

Notice - one more set of brackets on the right as on the left....


> UPDATE djp SET(col1, col2) = (SELECT col2, col1 FROM djp)


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to