Hello,
I have a table with the following data:
RWSHID RISUID JOBCODE
---------------------------------------------------------
0188280314 0010202751 000000
0188280314 0010202751 024019
0188280314 0010202751 024043
0188280314 0010424521 000000
0188280314 0010424521 024043
0188280314 0010424521 027212
0188280314 0010454707 007005
0188280314 0010454707 024019
0188280314 0010454707 024043
0188280314 0010661047 024043
0188280314 0010661047 027075
0188280314 0010667463 024019
0188280314 0010667463 024032
0188280314 0010667463 024043
0188280314 0010684834 000000
0188280314 0010684834 001094
........... ............... ...........
........... ............... ...........
........... ............... ...........
........... ............... ...........
I want to distinct (or group by) on RWSHID and RISUID and select last JOBCODE in each row.
Would you please send me the query run in Oracle (PL/SQL)
Thanks
-FA
But there is only one JOBCODE in each row.
And what do you mean by "last"; there is no date in evidence
Is this what you mean:
Select RWSHID, RISUID max(JOBCODE) group by RWSHID, RISUID