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 -> Re: Sqlplus question ??

Re: Sqlplus question ??

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Mon, 25 Oct 1999 14:30:58 GMT
Message-ID: <381469A2.9DE3C928@edcmail.cr.usgs.gov>


Why don't you temporarily create a sequence? Try this:

   CREATE SEQUENCE seq ......
   SELECT seq.nextval, col1, col2, ......    DROP SEQUENCE seq;

HTH,
Brian

Cliff Powell wrote:
>
> I'm trying to select from a single table into a flat ascii file to send to a
> customer. I need a sequential number for each row selected. For example,
> row 1 needs to have 00001 in a column, row 2 needs to have 00002, etc. How
> can I create a sequential number in this select ? I really don't want to
> add a sequence to the table, I just need a sequential number for each record
> selected out into my flat file.
>
> Many thanks.
Received on Mon Oct 25 1999 - 09:30:58 CDT

Original text of this message

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