On Mar 12, 2004, at 12:40 PM, pw wrote:
>
> Hello,
>
> What is the proper syntax for updating a column inone table from
> a column in another?
>
> I have tried this:
>
> UPDATE destination_table FROM source_table SET
> destination_table.column_one = source_table.column_b WHERE constraint;
>
update destination_table set column_a = (select column_b from
source_table where blah blah blah ) where blah blah blah
You can reference the values in destination_table inside the select.
--
Jeff Trout <jeff(at)jefftrout(dot)com>
http://www.jefftrout.com/
http://www.stuarthamm.net/