Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Import data from CSV using Opendata roswet

$
0
0

I'm trying to import data from CSV file using open data row set, below is the command used. one of the column has mix of integer and character(75/1000). As SQL server consider the column as INT, it returns columns with character as NULL. I tried to have only records with character but the data type got changed to Money and columns with more than one character shown as null. Modified few registry settings it worked for excel but not for CSV.

SELECT *
 FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Text;IMEX=1;Database=F:\'
 ,'SELECT * FROM [TEST.csv]')

Modified below registry settings:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Text

ImportMixedTypes=Text  <<FOr CSV>>

Hkey_Local_Machine/Software/Microsoft/Jet/4.0/Engines/Excel/

TypeGuessRows = 0 <<FOR EXCEL>>


vs


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>