Hi,
The following table contains P.F. details of employees, One record for each month. This is the sample ouput for a single employee.
SELECT empcode,
cmonth,
basic,
da,
pfno
FROM PAYRPT_PFAMT
WHERE EMPCODE = 'R0025'
ORDER BY CMONTH;
EMPCODE CMONTH BASIC DA PFNO
---------- ---------- --------- --------- ---------
R0025 200703 7500 1800 162
R0025 200704 9000 1800 162
R0025 200705 9000 1800 162
R0025 200706 9000 1800 162
R0025 200707 9000 1800 162
R0025 200708 9000 1800 162
R0025 200709 9000 1800 162
R0025 200710 9000 1800 162
R0025 200711 9000 1800 162
R0025 200712 9000 1800 162
R0025 200801 9000 1800 162
R0025 200802 9000 1800 162
But for some employees data is as follows. First nine months he is trainee. In the month of DECEMBER he got a permanent order. PFNO is common.
EMPCODE CMONTH BASIC DA PFNO
---------- ---------- --------- --------- -------
TR051 200703 1451.61 0 363
TR051 200704 1500 0 363
TR051 200705 532.26 0 363
TR051 200706 600 0 363
TR051 200707 1500 0 363
TR051 200708 919.36 0 363
TR051 200709 1500 0 363
TR051 200710 1354.84 0 363
R0257 200712 2300 0 363
R0257 200801 2300 0 363
R0257 200802 2300 0 363
How to identify all the employees having same pfno but different employee codes?
Regards
Krishna