Procedure which updates duplicate jobs to some new jobs

as i am new to pl/sql i want to create a procedure which updates duplicate jobs to some new jobs without using count and if then else statement.
EMPNO ENAME JOB
7000 ELLISON OWNER
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
EMPNO ENAME JOB
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
i want to update duplicate jobs with each new name which is not replicating
e.g if it is for salesman it should be newjob_s1,newjob_s2,newjob_s3.
Edited by: Aviral on Aug 1, 2011 6:20 AM

Dear Aviral,
refer:- http://www.oracle.com/pls/db102/portal.all_books
please read forum ediquette
Posters, please mind these common-sense rules when participating here:
- When asking a question, provide all the details that someone would need to answer it. Consulting documentation first is highly recommended. - When answering a question, please be courteous and respectful; there are different levels of experience represented here. A poorly worded question is better ignored than flamed - or better yet, help the poster ask a better question.
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
- See more tips in the FAQ
Thanks for doing your part to make this community as valuable as possible for everyone!
- OTN

Similar Messages

  • Procedure to update duplicate rows

    In a table i have some duplicate rows
    I can get it through this query : select PARTY_ID from XXWFS_CUSTOMER_EXT group by PARTY_ID having count (PARTY_ID) > 1;
    Now for the records which i got for each duplicate row i want to update the second row with a specific value.. so that duplicate rows does not exist anymore
    Ex: I got party id's 12, 14, 16, 18 two times each
    Now as 12 is two times.. i want to update the second row of 12 with some x value same is the case for other values like 14,16, etc
    how can i write a procedure for this
    Thanks,

    Hi,
    I think using single UPDATE statement we can do this.
    Please see below example. Please use this according to your requirement.
    SQL> create table test_emp (empno number,ename varchar2(40));
    Table created
    SQL> insert into test_emp values (1,'SURI');
    1 row inserted
    SQL> insert into test_emp values (1,'SURI');
    1 row inserted
    SQL> insert into test_emp values (2,'SRINU');
    1 row inserted
    SQL> insert into test_emp values (2,'SRINU');
    1 row inserted
    SQL> SELECT *
      2  FROM test_emp;
         EMPNO ENAME
             1 SURI
             1 SURI
             2 SRINU
             2 SRINU
    SQL> UPDATE test_emp t2
      2  SET t2.ename = 'X'
      3  WHERE t2.rowid > (SELECT min(t1.rowid)
      4                  FROM test_emp t1
      5                  WHERE t1.ename=t2.ename);
    2 rows updated
    SQL> SELECT *
      2  FROM test_emp;
         EMPNO ENAME
             1 SURI
             1 X
             2 SRINU
             2 X
    SQL> According to your table structure
    UPDATE XXWFS_CUSTOMER_EXT x1
    SET x1.party_id = <SOME X VALUE>
    WHERE x1.part_id = 12
    AND x1.rowid > (SELECT min(rowid)
                    FROM XXWFS_CUSTOMER_EXT x2
                    WHERE x2.party_id = x1.party_id);Cheers,
    Suri
    Edited by: Suri on Mar 14, 2013 7:32 PM

  • I recently updated my iTunes to the new version. For some reason the titles and details of songs on the SONGS page do not appear, although the songs will play. Has anyone else had this problem? Every other page seems to be ok.

    I recently updated my iTunes to the new version. When I opened it I found that there were no details listed on the SONGS page. On all other pages the relevant pictures/details appear. Although there are no details showing on the songs page, the songs are obviously there as when you click on a line it plays the song that should be listed. Has anyone else had this problem? (I am using a Windows XP Pro system on my Laptop).

    Did anyone ever suggest you reset your PRAM?
    http://docs.info.apple.com/article.html?artnum=2238
    Also might want to try resetting the SMC, although I
    doubt there's an issue there.
    http://docs.info.apple.com/article.html?artnum=304123
    I'm getting tired of people who supposedly know what
    they're doing simply guessing that resinstalling the
    OS might solve the issue. It's like trying to dissect
    a frog with a sledge hammer, and wondering why you
    didn't learn anything about anatomy in the process.
    These sorts of things, although bizarre, should be
    (and probably are) fixable without major surgery.
    Thanks for the suggestion... but I think my first question would be why these parameters would need re-setting? This is a new machine... It has never been shut down hard. It is used at most 10 hours per week... mostly using Office 2004 for MAC. I need to figure this out as I will soon need it as a Cs2/CS3 - Aperture workhorse.
    I too agree that it is best not to use a sledge when a scalpel is needed... but as a novice to the MAC world I may have been misled by Apple support. I seems to have fixed the symptoms ( some) but appears NOT to have addressed the cause... which is what I am after.
    Would TechTool Pro detect a bad HD or RAM?
    Thanks....

  • HT1338 i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created.

    i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created. As i dont have the access to the earlier id anymore.

    You cannot. The apps are assigned to that Apple ID and there is nothing you can do to change that. You could choose to download them again with the new Apple ID, any paid apps will need to be purchased again.
    Hope that helps.

  • HT5625 I want my new iPad mini to use my new Apple ID, not the old one that pops up without seemingly giving me the choice to update the  Apple ID user name; as a result I haven't been able to update my APPS for some time.

    I want my new iPad mini to use my new Apple ID, not the old one that pops up without seemingly giving me the choice to update the  Apple ID user name; as a result I haven't been able to update my APPS for some time. I changed my apple ID when I got a new e mail address a few months ago .

    Any apps you have installed from the old AppleID will always be tied to that AppleID. You have no choice but to enter the password for the old AppleID if you want to update apps downloaded using that ID.
    The only way to stop being asked for the password for the old AppleID is to remove all apps from the device that were downloaded using that old AppleID.
    You'd then need to re-download (and re-purchase) any apps you want to keep using under the new AppleID.
    Apps cannot be transferred between AppleIDs.

  • My itunes wont work I just installed some new update and now it wont even come up, I click the Itunes icon and nothing happens

    my itunes wont work I just installed some new update and now it wont even come up, I click the Itunes icon and nothing happens. Please help me I've tried uninstalling it and downloading it again but that didnt help :/

    DFU mode? How do I do that? So far the only thing I can do is hold down both buttons to power it on and nothing is on the screen and it wont reconize on my computer....

  • HT4531 apps which is able to work in ipod and some new features

    apps which is able to work in ipod and some new features

    1] Apple US is not currently offering unlocked iPhone 5 for sale, so
    it will not work in NZ. You must also research if the 4G/LTE bands used
    in the US are the same as those in NZ - otherwise you will not be able
    to connect at those speeds in NZ.
    2] iPhone warranty is valid only in country of original purchase. Should
    a situation arise that requires repair/replacement, you must return iPhone to US
    (either personally or by sending to friend/relative to deliver to Apple).
    Apple will not accept shipments from outside the US nor will Apple
    return it to you outside the US. All shipping, insurance, and any
    other costs are your responsibility.
    3] I do not know, but expect the solution that works for any US purchased
    electronics brought to NZ would also apply.

  • Add some new features in next nokua asha 311 updat...

    Some new features shuould be added in next asha 311 sw update
    1. Multitasking
    2. Pattern lock
    3. A stylish boot screen
    4. More apps
    5. Support for .sis files
    6. More featues other than those if u feel to put on
    pls add such featues pls

    Not all of the listed email recipients on my contact form are receiving the inquiries.    Muse allows me to add several email addresses separated by a semi-colon (see below from Corey Wrote) but only one of the three addresses are receiving the contact form inquiries.
    Corey@Adobe wrote:
    Forms
    We've added a new Form widget to the widget library.
    You can easily configure the form to send the form submissions to multiple email addresses, and optionally redirect users to another page after submitting the form.
    You can add and remove fields, and style the form as you would other Adobe Muse elements. You can independently style the various states of the form, and form fields to provide a compelling user experience, with visual cues for error states, empty states, and more.
    Because Form processing requires server-side support, Adobe Muse forms are configured to work when published to Adobe Business Catalyst. If you make changes to your form and publish again, Adobe Muse will make the appropriate changes to your Adobe Business Catalyst forms.
    Adobe Muse will safeguard data when redesigning your Adobe Business Catalyst forms                
    If a field with no data submitted is removed, it will be deleted from the database.
    If a field that has submitted data is removed, it will be preserved in the database, but can be deleted from the Adobe Business Catalyst admin console if desired.         

  • Hi! I updated my Mozilla Firefox to new verison(Mac OS X), and now in some pages all texts is in bold. Where is the problem? Thanks!

    Hi! I updated my Mozilla Firefox to new version(Mac OS X), and now in some pages all texts is in '''bold'''. Where is the problem? Thanks!

    Did you do a font check in Font Book?
    Be aware that a default encoding of UTF-16 as shows in your screenshot may lead to problems.<br />
    The default is Western (ISO-8859-1) and you should change the default encoding to that setting unless you have changed that deliberately to UTF-16 for specific web pages, but even in that case it is better to make the change via View > Character Encoding or set Auto-Detect to Universal or UTF-16.

  • HT4623 I updated my iphone to the new version and now it tells me to connect to itunes  which I did and it's not doing anything else, what do I need to do?

    I updated my iphone to the new version and now it tells me to connect to itunes  which I did and it's not doing anything else, what do I need to do?

    Try to connect in recovery mode, explained in this article:
    iOS: Unable to update or restore

  • I install at the new update cc2014 but for some reason in my computer appear double app the old one and the new  but the new dose not gave the setup that I have in my old version! What happen ?

    I install at the new update cc2014 but for some reason in my computer appear double app the old one and the new  but the new dose not gave the setup that I have in my old version! What happen ?

    Seriously, I doubt that your answer helped Erik.  He has two issues.
    He installed the new program and has a double icon folders with software. One for the new &  one for the old.  (I have this same problem.)
    He must have attempted to open one of the products and no longer see his personal settings transferred over.  (The install will ask to have those settings migrating, but you have to accept it. eh, I could be wrong; but, that what i remembered doing.
    I concur with his first. 
    However, i can not get any of my products to work.  Ie. have to constantly click on icon to open; once open i get a unexpected error and have to close. I'm on a mac pro w/ latest os system.
    In addition, I have tried to uninstall the older by clicking on the application's manager icon.; Unfortunately, it shuts down at each attempt.  Therefore, I am unable to un-install the old product or the new. 
    Possibly, we were hoping that the new product would be simply updated if an old recent was already installed. 
    Instead, the installation simply created a new icon and the new folder with product.

  • So now i might ned u all help, currently im using ipad and i get some news abt ios 6.1 and im interested abt it so i updated wif my Ipad (ver. ios 5) and i checked some web said ipad1 cnt update to ios6 so i might ned u all help how to restore bck to ios5

    so now i might ned u all help, currently im using ipad and i get some news abt ios 6.1 and im interested abt it so i updated wif my Ipad (ver. ios 5) and i checked some web said ipad1 cnt update to ios6 so i might ned help how to restore bck to ios5 as normal be4

    If it's showing the connect to iTunes screen then you will need to do that.
    But Apple don't provide any method to update the first gen iPad to iOS 5 (nor do they support downgrading the iOS version).

  • Hi guys, I have a question about Apple is that which industry and sector does Apple belong to? I have read some news on the Internet but I haven't found out which industry and sector that Apple really participant in. So could you me to answer this please?

    Hi guys, I do need your help to answer this question please. I wonder that which industry and sector does Apple belong to? I have read some news on the Internet but there haven't provided with specific source. So could you help me to answer this question please? Thank you very much <3

    Welcome to the Support Communities. Apple Inc. (AAPL) is listed on the NASDAQ exchange where it is categorized as follows:
    Industry: Technology
    Subsector: Computer Manufacturing
    (Source)
    More info from Apple can be found here:
    http://investor.apple.com

  • USMM report showing some Background job, which not in SAP

    Sir,
    I took USMM report from SAP PRD system for audit purpose.  Everything is fine , expect some background job. There showing some background job finish on 01.04.2013. But I don't find any background job in SM37 which showing finish in USMM report. Please suggest what to do. Following are the background Job..
    0000 Measurement Extensions Finished on 01.04.2013 at 12:55:30
    0001 ABAP Workbench Finished on 01.04.2013 at 12:55:44
    0002 Mobile Engine Finished on 01.04.2013 at 12:55:24
    0009 Activity Checks Finished on 01.04.2013 at 12:56:55
    0100 mySAP Human Resources Finished on 01.04.2013 at 12:55:26
    0101 SAP HR e-recruitment Finished on 01.04.2013 at 12:55:24
    0200 mySAP Banking Finished on 01.04.2013 at 12:55:25
    0250 Financial Services Loan Management Finished on 01.04.2013 at 12:55:25
    0300 mySAP Healthcare Finished on 01.04.2013 at 12:55:25
    0400 mySAP Utilities Finished on 01.04.2013 at 12:55:26
    0500 mySAP Telecommunications Finished on 01.04.2013 at 12:55:26
    0600 mySAP Insurance Finished on 01.04.2013 at 12:55:26
    0700 mySAP Public Sector Finished on 01.04.2013 at 12:55:26
    0730 mySAP Public Sector Campus Finished on 01.04.2013 at 12:55:26
    0800 mySAP Oil & Gas Finished on 01.04.2013 at 12:55:26
    0900 mySAP Engineering & Construction Finished on 01.04.2013 at 12:55:27
    1000 mySAP Aerospace & Defense Finished on 01.04.2013 at 12:55:28
    1100 mySAP Automotive Finished on 01.04.2013 at 12:55:28
    1201 SAP Financial Supply Chain Management Finished on 01.04.2013 at 12:55:26
    1215 SAP FSCM Credit Management Finished on 01.04.2013 at 12:55:27
    1500 mySAP Retail Finished on 01.04.2013 at 12:55:26
    1550 BI Accelerator Finished on 01.04.2013 at 12:55:27
    2100 SAP Records Management Finished on 01.04.2013 at 12:55:28
    2200 ICM Incentive and Commissions
    Management
    Finished on 01.04.2013 at 12:55:27
    2320 SAP Exchange Infrastructure Finished on 01.04.2013 at 12:55:29
    2600 SAP Exchange Infrastructure Adapter Finished on 01.04.2013 at 12:55:29
    6000 mySAP Financials Real Estate Finished on 01.04.2013 at 12:55:28
    7100 mySAP Financials Corporate Finance
    Mgmt
    Finished on 01.04.2013 at 12:55:28
    7500 Third-Party CAD Integration Finished on 01.04.2013 at 12:55:29
    7550 SAP Learning Solution Finished on 01.04.2013 at 12:55:30
    8020 Recipe Management Finished on 01.04.2013 at 12:55:29
    8030 Catch Weight Management Finished on 01.04.2013 at 12:55:28
    8040 RBD Tool Finished on 01.04.2013 at 12:55:29
    8050 Bex Broadcaster Finished on 01.04.2013 at 12:55:28
    Thanks & Regards,
    Nabin Chatterjee

    Hi,
    You will get the list of background jobs in SM37.
    It seems that these jobs are not being scheduled by your user ID.
    In username field use * and check on the desired job statuses and use the date from and to on which you want to see the jobs.
    Screen shot is also attached for your reference.
    Regards,
    Siddharth Khandelwal

  • Trying to import photos and copy as DNG. Nothing will upload though. Permissions are all accurate, saving to the right profile, etc. Nothing has changed on my computer but it will not let me import new pictures. Also, updated the software and some images

    trying to import photos and copy as DNG. Nothing will upload though. Permissions are all accurate, saving to the right profile, etc. Nothing has changed on my computer but it will not let me import new pictures. Also, updated the software and some images say "preview cannot be seen" and some don't. And when I try to import and I hit "new photos" it's all the photos on my card. My brain is about to explode.

    It said something similar where the thumbnails were supposed to be.
    Just got the newest edition of LR, 4.4
    4.4 is not the newest edition of LR
    We don't want to know that it said "something similar", we want to know the exact wording. In fact, you ought to state the exact problem you are having, in detail, instead of saying you are having the same problem.

Maybe you are looking for

  • Did you know about "Arbitration and Mediation" FAQ?

    I have just made a discovery that many of you frustrated Verizon customers will be very interested in knowing about. Did you know that you can type in legal action in the search verizon.com box and you will find a category called "Arbitration & Media

  • Cropping to a Fixed Resolution

    Is it possible in Aperture to use the crop tool and have resulting images with the same resolution (resampling)? I ask because I often do slight crops to straighten or for composition and do not wish to send designers a mixed bag of sizes. If I could

  • Do not want slim keyboard

    I bought a new 20" iMac from a store in Medford Oregon while on my honeymoon (just got married). The only Mac stores I know of in Oregon are in Portland, which was a bit too far north for us to travel (we live in California), so we got it from a loca

  • Downloading the spool

    Hi all, suppose i  have run a report in Background and generated a spool. How to download that spool file  into local file. thnak you sunny.

  • I have accidentally deleted my inbox and now can only see unread mail on my iPhone.  How can I restore this?

    I have accidentally deleted (or hidden) my inbox.  Now I can only see unread mail on my iphone.  I have switched it off and on again but this has not fixed the problem.  All help appreciated.  Thank you.