Reputation: 23
May I know the code to combine this two database item? I mean the TimeOUT
from the second line would be in the first TimeOUT
so it will be not null when I cast this out to the listview.
Please see image here:
I am using C#.
Upvotes: 0
Views: 128
Reputation: 222582
For this dataset, aggregation would do:
select
empID,
firstName,
lastName,
date,
min(timeIn) timeIn,
max(timeOut) timeOut
from mytable
group by
empID,
firstName,
lastName,
date
Upvotes: 1