Update fields in SQL table from Excel spreadsheet - TechRepublic
Question
May 14, 2009 at 04:37 AM
himself

Update fields in SQL table from Excel spreadsheet

by himself . Updated 17 years, 2 months ago

I need to update the existing contents of three fields in a table from a spreadsheet, preferably only updating those fields that require to be changed but a blanket update would be fine. The spreadsheet contains 5 fields, the first two of which in combination are the unique keys and are therefore used to select which records in the SQL table are to be updated.

Example data in the spreadsheet:

wh product anal1 anal2 anal3
BG 123456 ABC BCD CDE
FE 234567 ACB BCD DEF
GR 345678 ABC BCD CDE

I know how to import the spreadsheet to a temporary table if that would help, but the update query is the part that I can’t figure out.

I’d be grateful for any help at all.

This discussion is locked

All Comments