EmpID Name Date On duty Off duty Clock In Clock Out 1494 John 30/04/2012 09:00 12:00 09:17 1494 Steve 30/04/2012 17:00 21:00 1494 Pat 01/05/2012 09:00 12:00 1494 Jim 01/05/2012 17:00 21:00
i have data in for employee with two shift in sql table is it possible to put the data from one table to new table in this format
EmpID Name DAte OnDuty1 OffDuty1 Onduty2 offduty2 clockin1 clockout1 clockin2 clockout2 1494 john 30/04/2012 09:00 17:00 17:00 21:00 09:17
so upto how many level you've show us columns? what if there are more than 2 rows for a Employee? also didnt understand how same employeeid can have different names against it
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/