Re: Bulk Insert Question
From: Russell Fields (RussellFields_at_NoMailPlease.Com)
Date: 02/25/05
- Next message: Simon Shearn: "Re: SQL Server 2005 Beta 2 installation"
- Previous message: sqlnewbie: "Re: Bulk Insert Question"
- In reply to: sqlnewbie: "Bulk Insert Question"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: Simon Shearn: "Re: SQL Server 2005 Beta 2 installation"
- Previous message: sqlnewbie: "Re: Bulk Insert Question"
- In reply to: sqlnewbie: "Bulk Insert Question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|