Re: Problem with SQL
Posted in 1991
Quoting David A. Snyder, Folcroft, PA, in reply to my original message about SQL PERFORM that is storing records in the .dat file in reverse order: > When you select data from your table, do an "ORDER BY ROWID". That will > work until you start removing old records and inserting new ones. The > slots where the old records have been deleted will be filled before > expanding the size of the table. > > DAS > -- > David A. Snyder @ Snide Inc. - Folcroft, PA Current Release > is db4glgen-3.2 > UUCP: ..!uunet!das13!dave INTERNET: Dave.Snyder@snide.com Well David, your suggestion sounded like a good idea, so I gave it a try and found that it won't solve our problem. On a new table it is not necessary to order by the Rowid, becuse the rows are stored properly. On a table which has had some rows deleted, ordering by the Rowid makes no difference. The records are still stored in the reverse order in which they are added. I tried this with the ACE report since I know of no way to make the Query option of PERFORM sort by rowids. If I do a descending sort, I can get the records printed out properly, but only after some records have been added and deleted. This is *not* the solution to our problem, since it does not occur with any of our other 2.10 applications. Again, this problem is occurring with just one application. I experimented on our others (all which have deleted rows) and none of them place newly-added records at the *front* of the file. In other words, if you use PERFORM and add a bunch of records to your .dat file, and then delete some and then add some new ones in, those newly added records will appear at the *end* of your Current List even after you do another Query. Can anyone shed any light on this problem????? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= John Baker USAISC - Lex Phone: (606) 293-3644 or 293-3743 Lexington - Blue Grass Army Depot DSN: 745-3644 or 745-3743 Lexington, KY 40511-5109 E-mail: jbaker@lexington-emh2.army.mil =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=