9 Replies Latest reply: Jan 5, 2014 9:17 AM by Udip Shrestha RSS

    Using Where Exists

      Hi Everyone!

      I have a slight problem: I have table:

       

      Alignment RUN ID:

      ID    MD   RAT

      001   1      1

      001   2      1

      001   3      1

      001   4      1

      002   1      2

      002   2      2

      003   3      3

      003   1      3

       

      so, I want to the table to look like below using WHERE EXIST in 'EDIT SCRIPT' to show the following:

       

      ID    MD   RAT

      003   1     3

      002   2     2

      003   3     3

      001   4     1

       

      So I want a table that show the updated value based on ID but if it is not update it should show the original value and in this case 001 has MD 4 and RAT 1 cause it has not been updated on Alignment Run ID table, also whenever there is a new ID for the same MD and RAT it should be automatically show the latest one based on ID no. which is increasing.

       

      Thanks for any help.