tags:

views:

72

answers:

1

I have table as

Id Name Date        Time

1  S    1-Dec-2009  9:00

2  N    1-Dec-2009  10:00

1  S    1-Dec-2009  10:30

1  S    1-Dec-2009  11:00

2  N    1-Dec-2009  11:10

Need query to display as

Id Name Date        Time

1  S    1-Dec-2009  9:00

1  S    1-Dec-2009  11:00

2  N    1-Dec-2009  10:00

2  N    1-Dec-2009  11:10

My backend database is MS Access and using VB6 for Max and Min time

+1  A: 

I would make an additional two [int] columns, say hour and minute and then use an MS Access query to sort them. It would be MUCH easier to call that in VB. The query itself would be something like the following:

SELECT * FROM YOURTABLE ORDER BY id, hour, minute;
ajdams
Looks to me like he wants start and end times, since for ID 1 there are three entries in the source data, but only 2 in the desired output.
David-W-Fenton