Hi i have to update the column in a table based on values of 2 other columns. The values of the column are in XL sheet. there are around 1000 rows. how to update them with single statement.
Col1 Col2 Col3
Col2 is to be updated based on combination of co1 and col3.Column 1,column 2 are from one table and column3 is from another table. The values of col1,col2,col3 were sent in XL sheet and i loaded them into a staging table. now how to update them with single update statement.
I do agree with Tony...but i don't think if at all this has any issue...at least it looks like...and may be..i also might hv understood it wrong.
If you hv a staging_table having three columns...c1, c2, c3...Sofrom hwere they came is not more pertinent now...
and i feel u need to do an update of 2nd column based on using values of 1st & 3rd column for each rows...Is it.? If yes, then this is just a simple update command....what is the question of Single Update....this is not clear..
It could be like this....
set c2 = c1 + c3
...Will not it work....if i understood the issue correctly..