T
Tokash
I have the following data in a table:
NAME DATE START END
Joe 1/11/04 0900 1730
Joe 1/12/04 0600 1000
Joe 1/12/04 1000 1400
Joe 1/12/04 1400 1430
Joe 1/13/04 0900 1300
Joe 1/13/04 1300 1730
Joe 1/14/04 0900 1730
Joe 1/15/04 0600 1000
Joe 1/15/04 1000 1430
Joe 1/16/04 0900 1730
Joe 1/17/04 0700 1200
Joe 1/17/04 1200 1530
What I need to do is create a query that will pick the Nth
instance of each date. For example, the result for the
1st date instance would be:
NAME DATE START END
Joe 1/11/04 0900 1730
Joe 1/12/04 0600 1000
Joe 1/13/04 0900 1300
Joe 1/14/04 0900 1730
Joe 1/15/04 0600 1000
Joe 1/16/04 0900 1730
Joe 1/17/04 0700 1200
The result for the 2nd date instance would be:
NAME DATE START END
Joe 1/12/04 1000 1400
Joe 1/13/04 1300 1730
Joe 1/15/04 1000 1430
Joe 1/17/04 1200 1530
The result for the 3rd instance would be:
NAME DATE START END
Joe 1/12/04 1400 1430
Anyone have an idea of how to build such a query?
Thanks in advance for any help.
Tok
NAME DATE START END
Joe 1/11/04 0900 1730
Joe 1/12/04 0600 1000
Joe 1/12/04 1000 1400
Joe 1/12/04 1400 1430
Joe 1/13/04 0900 1300
Joe 1/13/04 1300 1730
Joe 1/14/04 0900 1730
Joe 1/15/04 0600 1000
Joe 1/15/04 1000 1430
Joe 1/16/04 0900 1730
Joe 1/17/04 0700 1200
Joe 1/17/04 1200 1530
What I need to do is create a query that will pick the Nth
instance of each date. For example, the result for the
1st date instance would be:
NAME DATE START END
Joe 1/11/04 0900 1730
Joe 1/12/04 0600 1000
Joe 1/13/04 0900 1300
Joe 1/14/04 0900 1730
Joe 1/15/04 0600 1000
Joe 1/16/04 0900 1730
Joe 1/17/04 0700 1200
The result for the 2nd date instance would be:
NAME DATE START END
Joe 1/12/04 1000 1400
Joe 1/13/04 1300 1730
Joe 1/15/04 1000 1430
Joe 1/17/04 1200 1530
The result for the 3rd instance would be:
NAME DATE START END
Joe 1/12/04 1400 1430
Anyone have an idea of how to build such a query?
Thanks in advance for any help.
Tok