dbTalk Databases Forums  

BULK INSERT load double quote as the value

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss BULK INSERT load double quote as the value in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
T Ho
 
Posts: n/a

Default BULK INSERT load double quote as the value - 06-21-2006 , 03:18 PM






Hi there,

I use BULK INSERT task to load a csv file into a SQL Server table. This csv
is a comma delimiter with double-quote text qualifier file looks like below:

"10000","33A","1007 --ARK/CO (OLD DM)","BD8C","1001+ 401 MATCH
EMPLOYER",101.15,06/03/2006
"10000","33A","1007 --ARK/CO (OLD DM)","BDI1","1001+ ER LONG TERM
DISABILITY",22.33,06/03/2006

I use a format file when loading the data. It contains the following:

7.0
7
1 SQLCHAR 0 5 "," 1 CC
2 SQLCHAR 0 5 "," 2 Process_Level_Home
3 SQLCHAR 0 50 "," 3 Process_Level_Home_Name
4 SQLCHAR 0 10 "," 4 Ded_Code
5 SQLCHAR 0 50 "," 5 Ded_Code_Name
6 SQLCHAR 0 8 "," 6 Amount
7 SQLCHAR 0 16 "\r\n" 7 GL_Date

The preview looks good. However after I executed the DTS, the columns
displays with the double-quote as the value instead of just the text itself.
What did I do wrong? Is Bulk Insert the right task for loading csv files?
Please help.

Tsuey Ho


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.