Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 OpenRowSet with CSV

Author  Topic 

shadowi
Starting Member

3 Posts

Posted - 2006-10-07 : 01:13:14
OPENROWSET('MSDASQL',
'Driver={Microsoft Text Driver (*.txt; *.csv)};DEFAULTDIR=C:\;Extensions=CSV;',
'SELECT * FROM abc.csv')

ID, Name, Tel,
12, Peter, 637834
34, Mary, (853)34343434
43, John, 234238

I find that the the 2nd row, tel column will return null
I think it is the mixed-type problem but it seems that "IMEX=1" doesn't work with CSV file, what can i do for this?
Please Help... ><"

shadowi
Starting Member

3 Posts

Posted - 2006-10-07 : 01:19:08
ID, Name, Tel,
12, Peter, 637834
34, Mary, (853)34343434
43, John, 234238
32, "Henry, Yu", 4234234

Because of the "Henry, Yu", I can't use bulk insert with format file as "," <-- will become a field termintor ><"
Go to Top of Page
   

- Advertisement -