|
Posted by markc600 on 06/20/07 12:50
select PIN,
max(case when Category='Authorized' and Year=2006 then Days
end) as [Auth 2006],
max(case when Category='Available' and Year=2006 then Days end)
as [Avail 2006],
max(case when Category='Personal' and Year=2006 then Days end)
as [Pers 2006],
max(case when Category='Authorized' and Year=2007 then Days
end) as [Auth 2007],
max(case when Category='Available' and Year=2007 then Days end)
as [Avail 2007],
max(case when Category='Personal' and Year=2007 then Days end)
as [Pers 2006]
from Attendance
group by PIN
order by PIN
[Back to original message]
|