I need to update a SQL table with data from Excel.
I have a SQL Server 2000 Table called Worksites with keyWorksiteID and MonitorID columns.
The keyWorksiteID column currently is populated with 200 unique worksite IDs.
The MonitorID column currently has only NULL values.
I have an Excel 2007 workbook called Spreadsheet.xls with one sheet called "WsMon" that has two columns, WorksiteID and MonitorID. The WorksiteID column is populated with all the Worksite IDs and many, but not all of the Monitor IDs are populated.
I'll have to update this repeatedly, so whatever method is easiest.
I tried to import the columns of data from Excel into a new Table using SQL Server Enterprise Manager DTS Wizard, but I got a new table with all the correct WorksiteIDs, but NULL in place of every MonitorID. On the WorksiteIDs with no MonitorID in Excel the MonitorID in the new SQL Table was blank, not NULL. Where there was a valid MonitorID in Excel, the MonitorID was NULL in the new table.
Thanks in advance.
Start Free Trial