Query [message #618800] |
Tue, 15 July 2014 13:28 |
|
simiha
Messages: 1 Registered: July 2014
|
Junior Member |
|
|
Hello
Can anyone can help me.
task:
Table A has Intime, outtime, earncode, hour, empcode.
data has 1/22/2014 8:00:00am, 1/22/2014 4:00:00pm, Holiday, 8,10002
1/22/2014 12:00:00pm, 1/22/2014 3:00:00:00pm, Regular, 3,10002
1/23/2014 8:00:00am, 1/23/2014 12:00:00pm, null, 4, 10003
1/23/2014 1:00:00am, 1/23/2014 4:00:00pm, Sick, 3, 10003
1/24/2014 8:00:00am, 1/24/2014 12:00:00pm, null, 4, 10004
1/24/2014 1:00:00am, 1/24/2014 4:00:00pm, null, 3, 10004
......
we have records like this around 10000000
I have to get whoever in earncode is null, not null which means have to get only if the person on earncode is holiday then need to get next row even if it null or not null.
No need to get like this Remaining rows as empcode 10004 since there is no earn code and it is regular work hours.
Please anyone reply me as earlier as possible.
thanks
simi
|
|
|
|
|