Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Time and Attendance need help pls... Expand / Collapse
Author
Message
Posted Monday, November 05, 2012 5:31 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, November 05, 2012 5:29 PM
Points: 4, Visits: 11
hi sdhanpaul, sorry if i didnt check the forum more often. no i havent found any solution yet.... can you please guide me? thanks
Post #1381325
Posted Monday, November 05, 2012 6:45 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, August 19, 2013 8:08 PM
Points: 43, Visits: 566
with rows as (
select *, row_number() over (order by emppin, trxdate) as rownum
from rawtrx)
select *, rowsMinusOne.trxtime as trxtimeIN,
ISNULL(rows.trxtime,1) as trxtimeOUT
from rows as rowsMinusOne
left outer join rows
on rows.rownum = rowsMinusOne.rownum + 1 and rows.emppin = rowsMinusOne.emppin

let me know if you need clarification on this.
Post #1381337
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse