![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- Hi I am new to DTS, I use bulk insert to load a csv file which has all its character (as opposed to numeric) data in double quotes. But the bulk insert takes the data into the table along with the quotation marks. I know you can do this easily in Transform Data Task, but for lot of records I want to use bulk insert. How can I get bulk insert to recognise double quotes? . |
#3
| |||
| |||
|
|
You have a couple of options 1. Format file (Examples on Google) 2. Clear the " after the event using REPLACE() -----Original Message----- Hi I am new to DTS, I use bulk insert to load a csv file which has all its character (as opposed to numeric) data in double quotes. But the bulk insert takes the data into the table along with the quotation marks. I know you can do this easily in Transform Data Task, but for lot of records I want to use bulk insert. How can I get bulk insert to recognise double quotes? . |
#4
| |||
| |||
|
|
Thanks for your reply. 1. I have tried the format file and given the double quotes as the text qulaifier but it still doesnt work. 2. How do I use the REPLACE() ? Can it be used in Bulk inserts? thanks Mark "Allan Mitchell" wrote: You have a couple of options 1. Format file (Examples on Google) 2. Clear the " after the event using REPLACE() -----Original Message----- Hi I am new to DTS, I use bulk insert to load a csv file which has all its character (as opposed to numeric) data in double quotes. But the bulk insert takes the data into the table along with the quotation marks. I know you can do this easily in Transform Data Task, but for lot of records I want to use bulk insert. How can I get bulk insert to recognise double quotes? . |
#5
| |||
| |||
|
|
No you cannot use REPLACE in the BULK INSERT. You would have to issue the statement after import. Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Mark" <Mark (AT) discussions (DOT) microsoft.com> wrote in message news:4185CF0F-A7DA-4F11-9AD4-BC90BF7B4576 (AT) microsoft (DOT) com... Thanks for your reply. 1. I have tried the format file and given the double quotes as the text qulaifier but it still doesnt work. 2. How do I use the REPLACE() ? Can it be used in Bulk inserts? thanks Mark "Allan Mitchell" wrote: You have a couple of options 1. Format file (Examples on Google) 2. Clear the " after the event using REPLACE() -----Original Message----- Hi I am new to DTS, I use bulk insert to load a csv file which has all its character (as opposed to numeric) data in double quotes. But the bulk insert takes the data into the table along with the quotation marks. I know you can do this easily in Transform Data Task, but for lot of records I want to use bulk insert. How can I get bulk insert to recognise double quotes? . |
#6
| |||
| |||
|
|
Thanks Allan for your reply, but why doesn't the bulk insert work with double quotes as the text qualifier? is it a known issue/bug in DTS? "Allan Mitchell" wrote: No you cannot use REPLACE in the BULK INSERT. You would have to issue the statement after import. Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.Konesans.com "Mark" <Mark (AT) discussions (DOT) microsoft.com> wrote in message news:4185CF0F-A7DA-4F11-9AD4-BC90BF7B4576 (AT) microsoft (DOT) com... Thanks for your reply. 1. I have tried the format file and given the double quotes as the text qulaifier but it still doesnt work. 2. How do I use the REPLACE() ? Can it be used in Bulk inserts? thanks Mark "Allan Mitchell" wrote: You have a couple of options 1. Format file (Examples on Google) 2. Clear the " after the event using REPLACE() -----Original Message----- Hi I am new to DTS, I use bulk insert to load a csv file which has all its character (as opposed to numeric) data in double quotes. But the bulk insert takes the data into the table along with the quotation marks. I know you can do this easily in Transform Data Task, but for lot of records I want to use bulk insert. How can I get bulk insert to recognise double quotes? . |
![]() |
| Thread Tools | |
| Display Modes | |
| |