Retrieval Of Latest Converted ID

Hi,
I have a table having 2 columns (OLD_ID, NEW_ID). Both are Primary Keys
NEW_ID column represents converted value for OLD_ID
OLD_ID NEW_ID
4123 3124
2090 3434
3124 4789
3434 6709
2341 9014
From the table, it is evident that ID 4123 got converted into 3124 and then 3124 got converted into 4789.
Similarly, ID 2090 got converted into 3434 and then 3434 got converted into 6709.
So, equivalently 4123 got converted into 4789 and 2090 got converted into 6709
I need to write a SELECT SQL query which gives the latest NEW_ID against all the OLD_IDs
Output for the above example should be
OLD_ID NEW_ID
4123 4789
2090 6709
3124 4789
3434 6709
2341 9014
Can anyone help me with the SQL query?

It seems you are looking for a hierarchical query, which seems better to ask for into the dedicated forum PL/SQL.
Nicolas.

Similar Messages

  • Retrieval of latest purchase order ?

    HI,
    The latest PO has to display when we try to enter the transaction to change or display PO. It's not happening in one of our environment.
    Appreciate if one of you tell us how the system retains the latest PO in memory?
    Regards,
    Ram

    Dear Ramprasanna,
    To Retrieve the latest Purchase order:
    <b>Path:</b> Logistics - Material Management - Purchasing - Master data -
                     Info record -  List display - Order Price History
    With regards,
    B.Ravindranath

  • How can i recover or retrieve my latest settings in my new I-pad,

    How can i recover or retrieve my latest settings in my i-pad, the files and photos after i accidentally click the button to restore back up in i-tunes sync the " Set up your i-pad",.. thanks in advance for the help.

    Ah sorry,, i mean the Old settings,,.. in my PC i have i-tunes installed by my friend and synced it with his i-pad and i did not know he syned his i pad to my PC..When i connect my i-pad to my PC, I accidentally click the restore back-up instead of Set as a new ipad. And when it done my files, photos where gone and was replace by the files and photos of my friend. Is there anyway to undo or retrieve my old settings,.. thanks

  • I saved my aiff files to ext. storage.  Now how can I retrieve them and convert them to mp3 or wav files?

    I was trying to free up space on my internal storage, so when I created files in Garage Band, I thought it would be a great idea to store them in my external hard drive.  However, I now wanted to retrieve my files and burn them to a cd.  When I dragged and dropped them to iTunes, they showed up in my playlist, but when I tried to burn the playlist, I got a message telling me there were no files in the playlist.  Then I looked into putting them back into Garage Band and transferring from there to iTunes.  But do not know how to do this, or even if I can do this.  Do I have to always convert my aiff files to either wav or mpe files before I store them?  Is it a lost cause for me now?  Would really appreciate help on this.

    On the external drive, in the Finder, do a get Info on one of those & report size, where, etc.
    Also, if you double click on one, does iTunes play it?
    You could save some space without losing quality by converting them to Apple Lossless.

  • Aperture 3: problem when re-processing raw files to the latest converter

    After converting to Aperture 3, many of my Nikon D80 raw files are coming up with the message:
    "This photo was adjusted using an earlier version of Apple's RAW processing."
    Aperture 3 offers a "Reprocess" button next to the message. Every time I click it, the images gets messed up with a big spike in the highlight end of the green channel. Is this a bug? Anyone else seeing this?

    I faced the same problem when importing from my card reader. I chose to save the A3 library on a removable disk. The importing took ages to finish, and then all the pictures had a green color. It said that the pictures were processed using an earlier Apple Raw processor, and I had the Reprocess button. I did that and nothing changed.
    I restarted A3, and now my project has disappeared even though it is available on disk.
    I opened the original library on my MB hard disk and the photos showed fine.
    I'm going to retest this, by importing the pictures to the default A3 library, maybe it will then recognize my pictures and process them correctly.
    EDIT: when importing to the default Aperture Library (not the one on a separate drive), it's very fast, correct, and no problems. I'll guess I'll have to backup the old way...
    Message was edited by: ninofrewat

  • Retrieving BLOB and Converting it to CLOB in Apex

    Hi,
    I am using Apex to upload a BLOB file (csv) and in my PL/SQL function, I convert it into a CLOB. However it doesn't read all the lines. Any advice? Thanks.
    Here's the function I used to convert BLOB to CLOB.
    function convertBlob(
    B IN BLOB
    return clob is
    c clob;
    n number;
    BEGIN
    if (b is null) then
    return null;
    end if;
    if (length(b)=0) then
    return empty_clob();
    end if;
    dbms_lob.createtemporary(c,true);
    n:=1;
    while (n+32767<=length(b)) loop
    dbms_lob.writeappend(c,32767,utl_raw.cast_to_varchar2(dbms_lob.substr(b,32767,n)));
    n:=n+32767;
    end loop;
    dbms_lob.writeappend(c,length(b)-n+1,utl_raw.cast_to_varchar2(dbms_lob.substr(b,length(b)-n+1,n)));
    return c;
    END;

    use dbms_lob.getlength rather than length to get the length of the blob.
    Nothing else obvious stands out, but should be plenty of examples in pl/sql forum and I know there is an example of this on the web. BLOB to CLOB?

  • I copied emails from aol in 2001 to my ibook, then transferred those documents to my G5 and saved it to my sdmi. Now i cannot open them. Can anyone help me on what to do how to retrieve and/or convert these documents?

    I have very precious letters I wrote and I want to retrieve them from 2001. Is there any way? Thanks for your help.

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Retrieving latest record of an employee for a same scholar ID from pa9048

    Hi Experties...!
    i want to retrieve the latest record from the pa9048 table where the scholar ID (sname) is same for an employee.........can anyone tell me how i do that..........!
    latest record in means of date.......!
    Thanx in advance................!

    Hi,
    Use the RP-PROVIDE-FROM-LAST inftytab subty beg end statement to retrieve the last record.

  • Retrieve latest revision of a file from perforce using web url

    Hello,
    I am trying to retrieve the latest revision of a file from perforce using the web url and powershell. e.g.
    $Pforce = "perforce.test.com/@md=d&cd=//music/Database/DBA%20Scripts/&cdf=//msc/Database/DBA%20Scripts/20scrub%20script.sql&c=don@//music/Database/DBA%20Scripts/common%20script.sql"
    $CommonScrub = Invoke-WebRequest $Pforce  
    I am getting an error message below about invalid header. Does anyone have any ideas what this means and how to fix it?
    Is there another method I can use to get the files from perforce using powershell. Has anyone done this?
    Invoke-WebRequest : The server committed a protocol violation. Section=ResponseHeader Detail=Header name is invalid
    At E:\scripts\GetHTML_Headers.ps1:3 char:16

    Hi,
    You can set the headers via the -Headers parameter (this only works in V4):
    http://technet.microsoft.com/en-us/library/hh849901.aspx
    Also,
    from this article:
    Error: The server committed a protocol violation
    The Exception will tell what the HTTP protocol violation is: 
    "The server committed a protocol violation. Section=ResponseHeader Detail=Header
    name is invalid"
    Fix the server to conform to the HTTP RFCs to avoid this error.  .NET is a stickler that the HTTP Protocol be followed.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Retrieving latest updated or inserted records without using a trigger

    I have to retrieve the latest updated/inserted records from a set of database tables. Say, if 'n' sets of different records have been updated or inserted into one or more different database tables then all the 'n' records of data should be retrieved using a java code without using a trigger.

    helpmeplz wrote:
    Thanks for your reply.
    But I don't know when or from where or what kind of data gets inserted/updated into the tables. I need a listener or a component which can handle events occured on the particular set of database tables, and get the event data. the java code should get the updated/inserted rows that have been inserted into a set of database tables by a third party.
    Please lemme know how I can do this.Realistically you can't.
    If and only if the tables have a modification timestamp then you could use that. Every table would need it.
    Other than that the only othe possibility would require that you keep an entire copy of each table in the memory, poll at a set interval and then do an entire comparison for each table. For very small data volumes (on the target tables) that is practical. For larger volumes it isn't.

  • Getting the latest file from application server

    Hi,
    I have to retrieve the latest file posted in R/3 from the application server to ISU which conatins the file name with timestamp.
    regards
    Mac

    Hi,
    so use fm EPS_GET_DIRECTORY_LISTING
    and sort corresp. table DIR_LIST
    A.

  • How to get the latest screen value (of input field in VA01)

    Hi Experts,
    I have a problem that when I am in VA01 (create sales orders) I see the (old) default value of the Req.Deliv.Date
    (in Item Overview tab). I don't see the latest entered value.
    This is screen field RV45A-KETDAT.
    Eg When I enter VA01, I first enter the order type.
    In the next screen you will see that the Req.Deliv.Date has already an intial value (current date).
    Now when I change this field to Nov 14 2011, I will still see the delault current date (in PAI).
    Only much later, the program will adopt the new value (but this is too late for me).
    (I actually need the value in FM SD_PARTNER_ABLAD_SELECTION)
    How come and how can I retrieve the latest value?
    (I already tried FM DYNP_VALUES_READ but this didn't help)
    Please advice.
    Thanks very much!
    Guido

    Did you try DYNP_VALUES_READ like this
          PERFORM DYNP_VALUES_READ USING 'SAPMV45A'
                                   '4001'
                                    'RV45A-KETDAT'
                           CHANGING RV45A-KETDAT
                                    SY-SUBRC.
    try writing this where you need your values. This oerform already exists in VA01 code and is used in teh PAi for another field. So just try callign this with these values and see if it helps.

  • Why doesn't latest version of pdf have a visible signature, only blank fields

    I'm C# user and tried both createUrlWidget and createPersonalUrlWidget to send a test document, and after it signed by signer, I used both getLatestDocument and getDocuments, but only get a pdf without seeing signature like this:
    I can get signed doc using the link in email sent to signer:
    So, I'm confused, can anybody answer me where did I missed?
    1. the method I used to create url widget:
    public static bool createUrlWidget(string fileName)
                FileStream file = File.OpenRead(fileName);
                com.echosign.secure.FileInfo[] fileInfos = new com.echosign.secure.FileInfo[1];
                fileInfos[0] = new com.echosign.secure.FileInfo(fileName, null, file);
                SenderInfo senderInfo = null;
                //string[] recipients = new string[1];
                //recipients[0] = recipient;
                RecipientInfo[] recipients = new RecipientInfo[1];
                recipients[0] = new RecipientInfo();
                recipients[0].email = "[email protected]";
                RecipientRole role = new RecipientRole();
                role = RecipientRole.SIGNER;
                recipients[0].role = role;
                WidgetCreationInfo widgetInfo = new WidgetCreationInfo();
                widgetInfo.name = "Test Docx";
                widgetInfo.fileInfos = fileInfos;
                //widgetInfo.counterSigners = recipients;
                WidgetPersonalizationInfo personInfo = new WidgetPersonalizationInfo();
                personInfo.comment = "Test sign of doc";
                personInfo.email = recipients[0].email;
                personInfo.reusable = false;
                UrlWidgetCreationResult result = ES.createPersonalUrlWidget(APIKey, senderInfo, widgetInfo, personInfo);// ES.createUrlWidget(APIKey, senderInfo, widgetInfo);
                if (result.success)
                    DocumentKey2 = result.documentKey;
                    urlWidgetReturn = result.url;
                else
                    return false;
                return true;
    2. the method I get the documents, there's only 1 content in returned DocumentContent[]:
    public static void getDocuments(string documentKey)
                GetDocumentsOptions opts = new GetDocumentsOptions();
                //opts.versionKey = "latest version";
                //opts.participantEmail = "[email protected]";
                opts.combine = true;
                opts.attachSupportingDocuments = true;
                GetDocumentsResult result  = ES.getDocuments(APIKey, documentKey, opts);
                if (result.success)
                    DocumentContent[] contents = result.documents;
                    foreach (DocumentContent dc in contents)
                        FileStream file = File.OpenWrite(string.Format("c:\\{0}.pdf", Guid.NewGuid()));
                        file.Write(dc.bytes, 0, dc.bytes.Length);
    This is my first time to use this api, so maybe I missed some important steps to cause this. I appreciate anybody which could see this and help me.
    Thanks a lot!
    Kenny

    I figured it out myself, I should use the shorter keys parsing from formDataCsv in GetFormDataResult to retrieve the latest version.

  • DNG Converter not working

    I have CS4 and just bought a D7000, realised it won't convert the RAW images to DNG.  I have downloaded the latest converter but it is not seeing the images on the SD card or from a folder on the laptop.  Have downloaded several times. 

    http://forums.adobe.com/community/dng
    http://forums.adobe.com/community/cameraraw

  • Problem in retrieving email using java mail api

    hi,
    In my project,i am retrieving mails from a particular email id.
    I am able to retrieve the latest mails and save it in a folder in my system.
    The problem is whenever i run the program eventhough the most recently received mail in inbox is retrieved and saved,again it is retrieving the same one and saving it in the same folder(not repeating).
    I tried to check the newmessages in the inbox using the folder.hasNewMessage() method in java mail api,but the method is returning false only regardless new mail is there in inbox or not.
    I want to read the unread messages only.Dont want to retrieve the already read mails.
    I got the mail retrieving code from the below site.(sorry not posting the code because it is so long and having 4 classes)
    http://www.builderau.com.au/program/java/soa/Getting_the_mail_in_receiving_in_JavaMail/0,39024620,39228060,00.htm
    Can anyone tell me how to read unread mails in the inbox?
    Thanks a lot

    hi parvathi
    i think your mail program is receving mails using imap
    the imap is only receve the mail from server but the pop is deleting the mails after receving
    use the following sample code
    package com.sfrc.mail.pop;
    import javax.mail.*;
    import javax.mail.internet.*;
    import com.sun.mail.handlers.message_rfc822;
    import java.util.*;
    import java.io.*;
    * Owner: SFRC IT Solutions Pvt Ltd
    * Author:Arunkumar Subramaniam
    * Date :12-06-2006
    * File Name: AttachRecive.java
    public class AttachRecive
    public static void main(String args[])
    try
    String popServer="192.168.1.1";
    String popUser="pl";
    String popPassword="password";
    // Create empty properties
    Properties props = new Properties();
    // Get session
    Session session = Session.getDefaultInstance(props, null);
    // Get the store
    Store store = session.getStore("pop3");
    store.connect(popServer, popUser, popPassword);
    // Get folder
    Folder folder = store.getFolder("INBOX");
    folder.open(Folder.READ_ONLY);
    // Get directory
    Message message =folder.getMessages();
    Multipart mp = (Multipart)message.getContent();
    for (int i=0, n=mp.getCount(); i<n; i++) {
    Part part = mp.getBodyPart(i);
    String disposition = part.getDisposition();
    // Close connection
    folder.close(false);
    store.close();
    catch (Exception ex)
    System.out.println("Usage: "
    +" popServer popUser popPassword");
    System.exit(0);
    Regards
    Arunkumar Subramaniam
    SFRC IT Solutions Pvt Ltd
    Chennai

Maybe you are looking for