Hi,
I have the following data in my DB2 table ("Employee") :
EMPID MONTH SALARY
E340 JAN 3000
E340 FEB 2000
E340 MAR 3000
E340 APR 4000
E341 JAN 3000
E341 FEB 2000
E341 MAR 3000
E341 APR 4000
In the above data, i have four records each for two employees with
employee-id E340 and E341.
My requirement is that i want the data for the third row of each
employee using only the Employee-id . I do not want to use a WHERE
clause for month in my select query.
The following SELECT query will give me all the four records for a
particular employee-id:
SELECT * FROM EMPLOYEE where EMPID='E340'.
I do not want all the four records but only the 3rd record for each
employee. Is there a way in which the above query can be modified to
provide only the third row data ?
Thanks for your time,
Sachin