Solved

Bulk update SQL statement needed

Posted on 2009-05-11
1
719 Views
Last Modified: 2013-12-19
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
0
Comment
Question by:bcarlis
1 Comment
 
LVL 2

Accepted Solution

by:
bcarlis earned 0 total points
ID: 24446657
I just wrote PL/SQL loop
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  â€¦
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question