help with multi-update


Posted on 16th Feb 2014 07:03 pm by admin

Now sure how to ask this really....
10g database if that matters.

I have a customer that accidently changed 742 records incorrectly. I'm being asked to fix it.
Did you know?Explore Trending and Topic pages for more stories like this.

Here is the sql that SHOWS me the relevant columns...

Select
p2.numberprgn,
a.agreement_id,
p2.ng_legacy_agreement_id
from
msp_sc.probsummarym1 p, msp_sc.probsummarym2 p2, msp_sc.ngslaassistm1 a
where
p.NUMBERPRGN = p2.NUMBERPRGN and
a.ORG_LEVEL1 = p.NG_SECTOR_NM and
a.CURRENT_ASSIGN_GROUP = p.ASSIGNMENT and
a.SEVERITY = p.SEVERITY_CODE and
p.OPEN_TIME >= '1-AUG-09' AND
p.OPEN_TIME <= '21-OCT-09' and
P.CATEGORY = 'USER-DESKTOP' and
p2.ng_legacy_agreement_id = '379' and
p2.ng_legacy_agreement_id <> a.agreement_id;

When I ran a distinct query against the agreement id, I get a total of 7 id's.

361
352
356
358
350
348
360

So I need to change the legacy ids to match the respective agreement id.

I know how to do it on a one by one basis...but there has to be a better way than doing that 742 times.

example:
NUMBERPRGN AGREEMENT_ID NG_LEGACY_AGREEMENT_ID
IM2108605 356 379
IM2113059 356 379
IM2116625 356 379
IM2117250 356 379
IM2119411 356 379
How do I go about this?

thx
No comments posted yet

Your Answer:

Login to answer
75 Like 30 Dislike
Previous forums Next forums
Other forums

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

Website Direction...
I recently used this code to try and make it so the page loads as http://www.domain.com/ when you ty

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

Help With editting and deleting form
So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.png
This table

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash