Re: Simple Bulk Insert

From: Wayne Snyder (wayne.nospam.snyder_at_mariner-usa.com)
Date: 09/20/04


Date: Mon, 20 Sep 2004 07:53:45 -0400

Unless I do not remember correctly neither BCP or bulk insert handle quoted
strings.... FOr that I usually go to DTS import which allows you to choose a
text input and specify that the columns are quoted..

-- 
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Prabhat" <not_a_mail@hotmail.com> wrote in message
news:%23z6uOYwnEHA.1152@TK2MSFTNGP10.phx.gbl...
> Hi All,
>
> I have one TEXT (Source file = D:\V090804.TXT) file which I want to Bulk
> Insert into SQL Table (Table Name =  PLEDGEFILE) of Same Structure.
>
> The text file has Data like:
>
> "I","0406927277","MR","EUGENE","JUNGBLUTH"
> "I","0401111111","MRS","PAULA","DICESARE"
>
> and My Bulk Insert Statement like:
>
> BULK INSERT PLEDGEFILE FROM 'D:\V090804.TXT'
>         WITH (FIRSTROW = 1, FIELDTERMINATOR = ',', ROWTERMINATOR = '\n')
>
> But this is Not working. I think it is treating "I" as value for 1st
Column
> [Including "" = Double Quotes.] while My field length is 1 for 1st column.
I
> Don't want the Double Quotes. I want Only the VALUE.
>
> Please Suggest How do I Bulk Insert Only Values - Excluding the double
> Quotes.
>
> Thanks
> Prabhat
>
>
>
>


Relevant Pages

  • Re: Cannot fetch a row from OLE DB provider "BULK" for linked serv
    ... In the destination table - before I forget to mention it - there is a column ... BULK INSERT DataGL.dbo. ... Regarding quotes in the data file, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)
  • Re: Generating one table with a terabyte of data
    ... Pretty much disabled the transaction log completely. ... We are using BULK INSERT ... for all those who don't know, SQL server prefers smaller BULK ... ORACLE seems to handle that 1 big file really well but with small files SQL ...
    (microsoft.public.sqlserver.dts)
  • Re: Recordset.AddNew and the recordset objects data retaining
    ... I am in an environment where bulk insert isn't an option--even though the ... underlying database is SQL server, I am using a third party OLE DB provider-- ... > insert(assuming you are using SQL server) or DTS. ...
    (microsoft.public.data.ado)
  • Re: Can Indexes effect Bulk Insert/Update Operations
    ... Columnist, SQL Server Professional ... becuase some operations need to be performed before insert/update the ... "Tom Moreau" wrote in message ... > unique/pk constraints before bulk loading the tables. ...
    (microsoft.public.sqlserver.programming)
  • Re: Timeout Expired
    ... So the timeout occurs during the bulk load operations? ... did you check the SQL Error Logs to see more clues about the timeout problem if there is any? ... locked for DML operations by SQL Server. ...
    (microsoft.public.sqlserver.server)