Hi,
i have a table like below
CREATE table #TempTable (ID int,checkedtime time(7),ctype varchar(1))
insert into #TempTable VALUES (101,'09:02:00.0000000','I')
insert into #TempTable VALUES (101,'18:10:00.0000000','O')
insert into #TempTable VALUES (102,'09:03:00.0000000','I')
insert into #TempTable VALUES (102,'13:43:00.0000000','O')
insert into #TempTable VALUES (102,'14:54:00.0000000','I')
insert into #TempTable VALUES (102,'18:10:00.0000000','O')
SELECT * from #TempTable
i need the result like below
regards
Kasim