I have a database, where I store daily stock market data. Main fields, that differentiate records are DATE and SYMBOL. I also have open, high, low, close and volume data, but those numbers are of secondary importance.
Record ID field gives me the most of trouble. I want to have as auto-enter serial number, but I have all of the symbols in one database, so if next bunch of data is not from AXP, but, i.e. from MSFT, that should have Record ID's of 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10, and not 11, 12, 13, 14, 15, etc.
Get (RecordNumber) also will not work, as it gets the number of the record in database without filtering of unique symbol.
So how do I get correct numbering of particular symbol in the database? I sort those by date in ascending order, so #1 is the oldest date and the most recent date has the highest Record ID.