I need a function that will give me the ability to sequence line numbers within a record set when records are inserted and or deleted.
I have two tables a header table and a detailed table. Within the detailed table I have the standard indexed ID field and a second ID field named AAID. The AAID captures the ID of the header row through a session id assigned on the insert of the first record.
The detailed records that match the header id can only have a maximum of 50 Line Numbers inserted. So for each record the AAID is unique and which indicated a new sequencing of records.
Also if a user deletes a record, say number 5, then we need to re-sequence.
I hope that this is clear and not to fuzzy.
Let me know.