July 23, 2003 at 8:22 am
Does anyone know how to remove double quotes from a text file when using bulkcopy
to load a table.
Regards
Ray West
July 23, 2003 at 3:10 pm
Can you post some sample data?
July 24, 2003 at 1:48 am
Test data
rays,"test data",1,0
rays,"test data",1,1
rays,"test data",1,2
rays,"test data",1,3
July 24, 2003 at 5:59 am
I hope you find an easier solution, but I've always run an update query that updated the value in question to
SUBSTRING(expression, start, length).
Peace Out!
Regards,
Matt
July 24, 2003 at 9:13 am
Another option is to specify the delimeter as ," in your format file.
July 24, 2003 at 9:21 am
If you are ALWAYS going to have the quotes and you input is comma delimitted use the following format file:
8.0
4
1 SQLCHAR 0 4 ",\"" 1 COL1 SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 12 "\"," 2 COL2 SQL_Latin1_General_CP1_CI_AS
3 SQLINT 0 4 "," 3 COL3 SQL_Latin1_General_CP1_CI_AS
4 SQLINT 0 10 "\r\n" 4 COL4 SQL_Latin1_General_CP1_CI_AS
quote:
Test datarays,"test data",1,0
rays,"test data",1,1
rays,"test data",1,2
rays,"test data",1,3
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply