tsql - Alternatives to Importing or Reading Text file with OpenRowSet on Windows 32 in SQL Server 2012 -
good morning friends:
i used piece of code in sql server import or read text file. running 64bit machine office 2013 professional (64bit). works well, that's because have microsoft access database engine 2010 64.
select * openrowset('msdasql' ,'driver={microsoft access text driver (*.txt, *.csv)}' ,'select * c:\my_folder\databases\my_files\mytext_file.txt')
the problem is, started working on computer has office 32, computer 64bit machine as-well. code wont work because cannot install microsoft access database engine 2010 64 32 bit office software installed. need first uninstall 32 bit , re-install 64bit.
i not have office software remove/install 32 office.
are there other options?
i tried creating format file text file unpredictable third party , format breaks, can't seem find error is. not control quality of file.
i have tried of on page no luck:
http://bradsruminations.blogspot.in/2011/01/so-you-want-to-read-csv-files-huh.html
this update:
i used bulk insert: getting double quotes in data inserted, not getting nulls, instead double quotes.
code:
use mydatabase; go bulk insert my_schema.my_table 'c:\my_folder\databases\my_files\mytext_file.txt' ( datafiletype = 'char', fieldterminator = ',', rowterminator = '0x0a', firstrow=2, keepnulls ); go
Comments
Post a Comment