Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bulk update SQL statement needed

Posted on 2009-05-11
1
Medium Priority
?
726 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

722 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