Wednesday, March 7, 2012

Import CSV

I run the below command and it turns the first column in the csv file to
money as the data type. It thinks that the first column is data type of
money.
Any help would be appreciated.
SELECT *
FROM
OPENROWSET('MSDASQL',
'Driver={Microsoft Text Driver (*.txt; *.csv)};
DEFAULTDIR=C:\temp\;Extensions=CSV;',
'SELECT * FROM nessus.csv')
It is not clear from your post what the exact question is. Are you loading
the data into a table and is it defaulting to money type? Have you looked
into the actual data in the CSV to see if it has any currency symbols like $
or # associated with the values?
Anith

No comments:

Post a Comment