Forum Moderators: open
I have a large table containing reservations. Reservation can have multiple 'lines', each with a different date. I want to produce reports listing all reservations in date order, but with ALL lines for each reservation then listed sequentially in the same group.
For example, the table contains:
ResNo Date
45678 2009-02-03
12345 2009-02-02
23456 2009-01-01
12345 2009-02-06
And I want a report listed like:
2009-01-01 23456
2009-02-02 12345 *
2009-02-06 12345 *
2009-02-03 45678
My question is how would I achieve this with a SELECT statement? I assume it would require a sub-query, but this is outside my experience and a few pointers would be appreciated.
Thanks in anticipation of any help.