SQL update from excel

theraapster

Member
Established Member
Joined
Apr 25, 2004
Messages
661
Location
NKY
Can anyone guide me on how to update a sql table form an excel spreadsheet? Basically I have 2 columns in the spreadsheet, one with the old codes and one with the new. I found one guy that recommend making a formula in excel like this in another column:

Code:
="update table set column values ("&D2&") where column values ("&J2&")"

and then copying it down through the rows, and then copying all the rows in the sql management studio to run. However the cell references don't seem to actually change the values even though they change in the equation, so I just get the first row repeated over and over. If anyone knows how to fix this or knows how to just write a sql statement that can do this I would greatly appreciate the advice.
 

Users who are viewing this thread



Top