Monday, May 21, 2012

Update empty column with calculated values from SELECT statement?

I have a table, 6 columns, the 6th column is empty but the other 5 have data. I used the 4th and 5th columns to calculate a value and then I wish to insert this value into the 6th column.



How do I link my Select statement which creates the values for the 6th column to the



"UPDATE Table_Name SET Column6 = "



part of my SQL statement.



I will also have to make sure the correct rows get updated with the correct values by using the primary ket of Columns 1 to 4





No comments:

Post a Comment