How do I update existing SQL table data from a .csv file using an update query statement containing path of the file?
Posted on 2007-11-26
I am using SQL Express mgmt studio along with DTS for import/export of data....
I have an SQL table called Table1 and I want to update it with data from an Excel file called 'NewData' located at C:\NewData.csv
The file 'NewData' contains a column variable named 'IDNUMBER' and Table1 also contains this variable column called IDNUMBER. I want to update each record/row of data in Table1 with the data from the 'NewData.csv' file where the IDNUMBERS match.
All variable names/headers in NewData.csv also exist in Table1, so the mapping is direct and simple... I just need some help with the statement and integration of the path to the NewData.csv file to get this thing working...any help is really appreciated.