Or, in another form, How to achieve the same type of thing that Load Into Table ... (ColA,ColB,filler(),ColC) would do and still fire triggers.
Say you have a table:
You have a CSV file import.csv:
I have tried using the input, but cannot figure a way for it to skip a column.
I have tried using the load table, with filler(), and this correctly skips the column, but does not fire the triggers.
Moving the data into a temporary table and adjusting it from there is probably the way we will go, but I wanted to make sure I was not missing anything.
Any help would be appreciated.
asked 19 Apr '11, 14:12
Try using OPENSTRING.
For your example, use something like:
See the FROM clause in the docs for more info.
Mark's suggestion for using OPENSTRING is probably the way to go, but if you want an alternate suggestion, you could also consider using a proxy table. Assuming you are on Windows, the Microsoft Access Text Driver is a decent ODBC driver for accessing CSV files. You could then map a proxy table to your CSV file and use it like any other base table.
For some additional information/discussion have a look here