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

upload control not working with update panel
Hi,

I am working with Asp.Net FileUpload control with ajax update panel,

if i use the

Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device

MySQL Primary key gap
Alright, so I have a table with 26 entries in it (id, filename, caption) for my image randomiser (ht

progress bar...need expert opinion of experienced webmaster
Hey guys, quick question:

I want to display a progress bar when I upload files, but I am not

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

Need help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

A problem with my GD class
Hello,

I created a nice (and simple for now) GD class.
The problem is , it works great on

SAP Management Console is blank
Dear All ,

I am facing problem in my des sever suddely in SAP Management Console is blank and

Need PHP help... have all the elements... just need help putting them together :
Hey Guys,

I was wondering if someone could help me. I am doing a website for a client which

cPanel API
Hi Guys,

Need a little guidance. I'm trying to get my script to communicate with cPanel (or W

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