Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help: Using break on date-field

Help: Using break on date-field

From: Peter Bishop <pjb_at_nortel.com>
Date: Mon, 23 Nov 1998 23:26:23 +0000
Message-ID: <3659EF1F.C9F3026C@nortel.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US