JimmyKoolPantz,
If your application depends on the physical ordering of rows in a table then
you've got real problems.
The order of rows (or columns) in a table must never be important to an
application using that data. Your app should instead work with a query result
that has been ordered.
Kerry Moorman
- Show quoted text -
Maybe I mislead everyone from the beginning.
What i need to do is flip a file, an example would be, the first
record needs to be the last record of the file and the last record
needs to be the first record of the file.
Each file, that we use contains a field named "Seq_No". If I have a
dbf file that contains 5000 records the first seq_no would be 1, and
the last seq_no would be 5000.
I came here looking for the quickest way to flip the file. And, since,
some of the files are large, I was concerned about memory usage if I
decided to load the file into my application. So, I thought, the
quickest way could be just the query the dbf file. But, apparently
not. No big deal. I will just use my dbf read, store the file in
memory, sort it by seq_no, and then generate a new dbf file.
I was just exploring my options, and figured maybe I could just query
the file and call it a day.
I had to learn the dbf file structure for my dbf_writer, and i'm
really supprised that the dbf file structure does not contain a flag
position to sort columns in asc or desc order.
Also, just to let you know, the sort for this particular job is
important. Each dbf file that I generate is sent to the mail room for
printing, and some jobs require to be printed in reverse order.