Is ROWID sequential?

smoser16

New Member
I have a Progress database that I need to poll on a regular interval to get the new rows in certain tables. Not all of these tables have a date column or other column that can be used in the query to tell which rows are new. Can ROWID be used? Is it sequential?

SELECT *
FROM pub.MyTable
WHERE ROWID > {The last ROWID returned}
 
No. If you want to do something like that, add a column to the table which is filled by a sequence.
 
Unfortunately I don't have any control over the Progress database and cannot add a column. I know that I can't rely on the ROWID over time, but I was hoping that I could use it during "operational hours" when I know the data will not be dump-and-loaded etc.
 
No, rowid is reused as well.
If you delete a record that rowid will be used for a new record.
remember that rowid is the 'physical' location of the record in the database.

Casper.
 
If you cannot change the structure of the table(s) as in, add fields and stuff, maybe you *can* add a database trigger? As far as I know that does not have any impact on the r-code. A write trigger could be used to output some information into a new database table where you can record table name, date-time and the unique key of the record. Alternatively you could output to an ASCII file (although that is probably not really the best destination and most reliable to go for).
 
The bottom line here is that without a column for the purpose or some other auditing mechanism, there is nothing on which to base any such extract. There are a variety of techniques for doing what you describe -- sequences and date-time stamps in the table itself, triggers to write a trail elsewhere, after-imaging and other replication techniques to keep another database up to sync. Each has its place, but none can be implemented with no changes.
 
Back
Top