BILL Carlisle
asked on
Bulk update SQL statement needed
Hi, Have Oracle 9.2 and I need a Bulk update SQL statement to do following:
select h.hdrId, h.seqNbr, d.pkId, d.seqNbr
hdrtbl, detailtbl
where h.rptID = 2
order by 1,3
I need to bulk update the detaltbl's seqNbr with a consectutive number based on sort order.
report 1234 may have 6 headers and header 1 has 3 detail, 2 has 6 detail, 3 has 18 detail.. etc
After bulk update header 1 would have seq 1-3, 2 have 4-9, 3 have 10-27, etc
Need to update header tbl too, if had 12 headers 1-12 but u delete 6,7,10 it results in 1-9
select h.hdrId, h.seqNbr, d.pkId, d.seqNbr
hdrtbl, detailtbl
where h.rptID = 2
order by 1,3
I need to bulk update the detaltbl's seqNbr with a consectutive number based on sort order.
report 1234 may have 6 headers and header 1 has 3 detail, 2 has 6 detail, 3 has 18 detail.. etc
After bulk update header 1 would have seq 1-3, 2 have 4-9, 3 have 10-27, etc
Need to update header tbl too, if had 12 headers 1-12 but u delete 6,7,10 it results in 1-9
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.