Bulk Import with header in text file



I would appreciate some help on a procedure that I have. Using Bulk
Insert, I would like to import records from a text file. The issue I
have is the file contains a header - '1AMC_TO_Axiz' and a footer
'1AMC_TO_Axiz2". Using a format file, I can get the import to work by
editing the file and removing these two entries. Is there a way to
setup the format file to skip these two entries? My file currently
looks like this:
7.0
16
1 SQLCHAR 0 50 "|" 1 keyMemberNo
2 SQLCHAR 0 10 "|" 2 fldEffdate
.................
16 SQLCHAR 0 10 "\r\n" 16 fldNewRecord

Thanks
Charles

.



Relevant Pages

  • 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.server)
  • 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)