Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help: Using break on date-field
I have a table containing a date column and a text column.
I would like to perform a select which will group the text data together and sort that by date order.
For example. If the table contains:
20/11/98, A 20/11/98, B 23/11/98, A 20/11/98, A 23/11/98, B
the output would be:
20/11/98, A 20/11/98, A 20/11/98, B 23/11/98, A 23/11/98, B
This is obviously a simplistic view of the problem.
I've been using the following code:
> break on date skip 0 dup on text skip 0 dup
> select date, text from table order by date, text;
The results are grouped by the date value but I get the 'A' and 'B' values distributed throughout the date groupings.
For example:
20/11/98, A 20/11/98, A 20/11/98, B 20/11/98, A 20/11/98, A 20/11/98, B 23/11/98, A 23/11/98, B 23/11/98, A 23/11/98, B
Any ideas?
Responses by email would be appreciated.
Thanks. Received on Mon Nov 23 1998 - 17:26:23 CST