Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Duplicate Values

625911Apr 15 2008 — edited Apr 16 2008
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 14 2008
Added on Apr 15 2008
4 comments
340 views