[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Deleting rows in flatfile
- Subject: Re: Deleting rows in flatfile
- From: "Lynds,Rick" <rlynds@MWD.DST.CA.US>
- Date: Mon, 3 Apr 2000 06:57:07 -0700
Madav,
Depending on what you are doing:
1. If you are detecting the bad row while you are creating the flat file,
then simply don't write the row.
2. If you are detecting the row while processing the flat file as input,
then you need to expand your program to create a new flat file (without the
bad rows). There is no way to directly delete a bad row from a flat file,
so you need to copy the file row by row and skip the bad rows. The simplest
way to do this is to write out each row into another flat file while you are
processing the input file. Of course, this could be a lot of overhead if
there are no bad rows at all, but that is one of the inherent inefficiencies
of flat-file processing.
Good Luck - send me a note if you need additional help or sample code.
Rick Lynds
Metropolitan Water District
-----Original Message-----
From: Madav V [mailto:vmadav@HOTMAIL.COM]
Sent: Monday, April 03, 2000 6:31 AM
To: SQR-USERS@list.iex.net
Subject: Deleting rows in flatfile
Iam writing an SQR for filtering a flatfile. It is posting bad rows into
suspend file and remaining into output file. The records in suspend file
will be used after corrections.
I have to delete completely some bad rows from flatfile(should not even
send it to suspend file).
I know how to delete a file. But problem is with deleting rows.
Can anybody help me...
Regards,
Madav
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com