Re: Bulk Insert for data with quotes

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 20:32:10 +0100

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@discussions.microsoft.com> wrote in message 
news:4185CF0F-A7DA-4F11-9AD4-BC90BF7B4576@microsoft.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?
>> >.
>> >
>> 


Relevant Pages

  • Re: Bulk Insert
    ... and the error message says: ... Error: Bulk Insert fails. ... file with comma as field delimiter, and quotes are obviously not part ... A format file for the above would look ...
    (microsoft.public.sqlserver.tools)
  • Bulk Insert for data with quotes
    ... Format file ... >I am new to DTS, I use bulk insert to load a csv file ... >character data in double quotes. ... But the bulk insert ...
    (microsoft.public.sqlserver.dts)
  • RE: Bulk Insert for data with quotes
    ... I have tried the format file and given the double quotes as the text ... Can it be used in Bulk inserts? ...
    (microsoft.public.sqlserver.dts)
  • Re: Bulk Insert & Text Qualifier
    ... Here is an example of a format file to remove the quotes. ... > How can I specify a text qualifier on Bulk Insert? ... > When I Bulk Insert texts like "NY", the quotes are imported as well. ...
    (microsoft.public.sqlserver.programming)
  • Re: Disabling DTS Bulk insert task
    ... Simon ... "Allan Mitchell" wrote in message ... >> this is the error message i get if i use the disablesetp method with the ... >> bulk insert task. ...
    (microsoft.public.sqlserver.dts)