Re: Simple Bulk Insert

From: Uri Dimant (urid_at_iscar.co.il)
Date: 09/20/04


Date: Mon, 20 Sep 2004 14:57:21 +0200

Try
BULK INSERT dbo.tb FROM 'd:\txt.txt' WITH (FIELDTERMINATOR = '","')

"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: 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)
  • On to Bulk Insert issues
    ... Bulk load data conversion error (type mismatch or invalid character for ... The bulk load failed. ... tell MS SQL Server that the fields are optionally enclosed by quotes. ...
    (comp.databases.ms-sqlserver)
  • Re: Simple Bulk Insert
    ... Unless I do not remember correctly neither BCP or bulk insert handle quoted ... I support the Professional Association of SQL Server and it's community of SQL Server professionals. ... > Insert into SQL Table (Table Name = PLEDGEFILE) of Same Structure. ... > Please Suggest How do I Bulk Insert Only Values - Excluding the double> Quotes. ...
    (microsoft.public.sqlserver.server)
  • Re: Simple Bulk Insert
    ... Unless I do not remember correctly neither BCP or bulk insert handle quoted ... I support the Professional Association of SQL Server and it's community of SQL Server professionals. ... > Insert into SQL Table (Table Name = PLEDGEFILE) of Same Structure. ... > Please Suggest How do I Bulk Insert Only Values - Excluding the double> Quotes. ...
    (microsoft.public.sqlserver.programming)

Loading