I need to generate a sequential number. NOT using an oracle sequence.
I have a form with an employee record as the master record. Employee Addresses as the child records. I have a column in the addresses called seq_num. The first address should be seq_num = 1, the second address should be seq_num=2 etc. I need something in a trigger, maybe a pre-insert trigger on the child data block, that does something like a
SELECT MAX(SEQ_NUM) + 1 FROM DETAIL,
MAIN
WHERE
DETAIL.ITEM_ID=MAIN.ITEM_ID
AND
GC_TAG_UPGRADE_DETAIL.ITEM_ID = :mytarget
any suggestions about how to generate this number on a form would be appreciated...
I have a form with an employee record as the master record. Employee Addresses as the child records. I have a column in the addresses called seq_num. The first address should be seq_num = 1, the second address should be seq_num=2 etc. I need something in a trigger, maybe a pre-insert trigger on the child data block, that does something like a
SELECT MAX(SEQ_NUM) + 1 FROM DETAIL,
MAIN
WHERE
DETAIL.ITEM_ID=MAIN.ITEM_ID
AND
GC_TAG_UPGRADE_DETAIL.ITEM_ID = :mytarget
any suggestions about how to generate this number on a form would be appreciated...