Re: Bulk Insert Question

From: Russell Fields (RussellFields_at_NoMailPlease.Com)
Date: 02/25/05


Date: Fri, 25 Feb 2005 16:54:17 -0500

Use a format file. Here is part of the description:

If specifying a prefix length of 0 and no terminator, bcp allocates the
maximum amount of space shown in the field length prompt because this is the
maximum space that may be needed for the data type in question. The field is
treated as if it were of fixed length so that it is possible to determine
where one field ends and the next begins.

RLF

"sqlnewbie" <1@1.com> wrote in message
news:uGbyT73GFHA.2736@TK2MSFTNGP09.phx.gbl...
>I need to move some data from an ascii file to a database. I want to use
>BULK INSERT. The problem I have is there is no field seperation in the
>ascii file. For example, columns 1-5 constitute a number, 6-28 constitute
>a description, etc. Is there a way to use BULK INSERT without having to
>put a comma or something between each field of data. Below is a small
>example of data :
>
> item description cost retail
> 12345thisistheitemdescription00245903599
>



Relevant Pages

  • Cannot fetch a row from OLE DB provider "BULK" for linked server
    ... consistently receive during a stored proc Bulk Insert from a text file. ... Format file created using BCP ... BULK INSERT DataGL.dbo. ... I've checked the data file for anomalies. ...
    (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)
  • Re: Bulk Insert Question
    ... >>I need to move some data from an ascii file to a database. ... The problem I have is there is no field seperation in the ... Is there a way to use BULK INSERT without having to put ... > editor to check the contents of the format file and tweak it as needed. ...
    (microsoft.public.sqlserver.programming)
  • Re: Bulk Insert Question
    ... >BULK INSERT. ... The problem I have is there is no field seperation in the ... questions and saving the information in a format file. ... editor to check the contents of the format file and tweak it as needed. ...
    (microsoft.public.sqlserver.programming)
  • 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.programming)