Re: Simple Bulk Insert

From: Prabhat (not_a_mail_at_hotmail.com)
Date: 09/20/04


Date: Mon, 20 Sep 2004 17:42:55 +0530

Thanks Snyder,

We can use DTS for that. But I was looking for any Support in Bulk Insert.
I think We can Do that using "Format File". But I don't know How to create a
format file for that.

Thanks
Prabhat

"Wayne Snyder" <wayne.nospam.snyder@mariner-usa.com> wrote in message
news:OLUMrkwnEHA.2172@TK2MSFTNGP10.phx.gbl...
> 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: Simple Bulk Insert
    ... We can use DTS for that. ... But I was looking for any Support in Bulk Insert. ... I think We can Do that using "Format File". ...
    (microsoft.public.sqlserver.server)
  • Re: Bulk Insert for data with quotes
    ... DTS has nothing to do with it. ... the BI Task is a wrapper around the BULK ... It does work if you use a format file. ... Allan Mitchell MCSE,MCDBA, ...
    (microsoft.public.sqlserver.dts)
  • Re: Bulk insert via SQL DTS
    ... from our own SQL server and have no line endings at all. ... BULK INSERT command from within a stored proc. ... Here's the format file I'm using: ... >> I'm trying to get a bulk insert job to run from within a DTS task. ...
    (microsoft.public.sqlserver.dts)
  • 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: Using a wildcard with the FTP Task
    ... As for the SQL server DTS taskobject's "SourceFileName" property, ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.sqlserver.dts)