The following will read a csv file.
SELECT * FROM OPENROWSET (‘MSDASQL’, ‘Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=c:data;’, ‘SELECT * from test.csv’);
The following will read a tsv file (with a txt extension).
SELECT * FROM OPENROWSET (‘MSDASQL’, ‘Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=c:data;’, ‘SELECT * from test.txt’);
Have you tried this in an x64 environment? We’re having an environment freak out on this between a dev and production environment and trying to nail down what is causing it.
Welcome to hell.
x64 SQL does not include Jet and according to Microsoft never will. Jet is how this text driver works.
No I only used this in a 32 bit environment.