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 -> Re: How to add and populate a new column?

Re: How to add and populate a new column?

From: Mark Rosenbaum <mjr_at_netcom.com>
Date: 1997/01/03
Message-ID: <mjrE3Fz8I.K1t@netcom.com>#1/1

In article <01bbf991$d4ae7dc0$096fc589_at_roger.labinterlink.com>, Roger Snowden <rsnowden_at_labinterlink.com> wrote:
>John Verbil <jverbil_at_netmail.mnet.uswest.com> wrote in article
><32BB0B5C.6663_at_netmail.mnet.uswest.com>...
>> I don't see how. ROWIDs have no correlation to any ORDER BY clause in a
>> cursor. ROWNUM will assign numbers 1-N to each row returned based on
>> the ORDER BY clause.
>> John Verbil
>> U S WEST Communications
>
>Sorry, but this is dangerously incorrect. ROWNUM is a psuedocolumn which
>identifies relative row number within a result set, and is assigned BEFORE
>the order by clause is executed.
>
>Roger

The way around this is to create a view with the order by clause and then select from the view with a rownum column. Haven't tested it but as I recall this does work.

Hope this helps

Mark Rosenbaum			Otey-Rosenbaum & Frazier, Inc.
mjr_at_netcom.com			Consultants in High Performance and
(303) 727-7956			Scalable Computing and Applications
POB 1397			ftp://ftp.netcom.com/pub/mj/mjr/resume/
Boulder CO 80306 Received on Fri Jan 03 1997 - 00:00:00 CST

Original text of this message

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