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

Home -> Community -> Usenet -> c.d.o.server -> Creating sequence for group by in a query?

Creating sequence for group by in a query?

From: Ron <tachoknight_at_gmail.com>
Date: 29 Jun 2006 11:14:29 -0700
Message-ID: <1151604869.117913.254110@d56g2000cwd.googlegroups.com>


Hi all-

I am trying to insert into a table that takes two number fields. The first field I want to generate with a sequence, the second is an ID. The issue is that the base data has a date field. So I have a table like:

ID             ENTERED_DATE
32423       5/5/06
34644       5/5/06
11907       6/1/06
95996       6/16/06
94311       6/16/06

So that the table I'm inserting looks like:

GROUP     ID
1               32423
1               32423
2               11907
3               95996
3               94311

So the sequence is based on the group by of the entered_date field. Is this possible to do in a single sql statement?

Thanks,

Ron Received on Thu Jun 29 2006 - 13:14:29 CDT

Original text of this message

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