|
Subject:
|
Remove Header and Trailer record???
|
|
Posted By:
|
gzura
|
Post Date:
|
4/27/2005 9:53:24 AM
|
I have a text file that has a header and trailer record how do i remove these so i can import into my table?
Example:
9 20050427 HEADER RECORD 0000000 00000 000000000 123456 00 654321 DATARECORD 0000000 00000 000000000 123456 00 654321 DATARECORD 0000000 00000 000000000 123456 00 654321 DATARECORD 0000000 00000 000000000 123456 00 654321 DATARECORD 6 20050427 TRAILER RECORD
The problem is more with the trailer record i can just start the import at row 2 but how do i determine where the LASTROW is and not import it?
Thanks
|
|
Reply By:
|
jbenson001
|
Reply Date:
|
4/27/2005 12:31:01 PM
|
I found a way but not sure if it will work for you purposes. On the data transformation task, right click and choose properties. Click on the options tab. There you can specify the first row and the last row to be imported. However this is only good if you know the number of rows in the text file.
Hopes this helps,
Jim
|
|
Reply By:
|
gzura
|
Reply Date:
|
4/27/2005 12:48:15 PM
|
I am working with a transaction file that could have one record in it today and 10,000 the next day.
I know there is a LASTROW Parm used with BULK insert but i am know sure how to utillize it within DTS.
LASTROW [ = last_row ]
Specifies the number of the last row to copy. The default is 0, indicating the last row in the specified data file.
I think it would read something like this LASTROW [ = lastrow -1 ] byut where do i do somthing like this ActiveX script or SQL statement?????????
please help
|