Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: giving tuples a number to make them unique..
Jan, Do the instanceid column values have to start over each time the value
of the name column changes? If not then you can probably use the rownum
psuedo column: select name, rownum ..... If they need to start over then
this would be easy to do in pl/sql, but I do now know you could do it in
native SQL.
Just a thought.
Mark D. Powell
In article <369e0837.88294881_at_bigXb>,
uk7i_at_rz.uni-karlsruhe.de wrote:
>
> i need to number rows in a _select_-statement to get unique tuples
> with ascending instanceids:
>
> name, instanceid
> a, 1
> a, 2
> b, 1
> c, 1
> c, 2
> c, 3
> d, 3
>
> (the select-statement is a flattened inclusion-hierarchy using
> connect-by which is intended to be inserted in another relation)
>
> any ideas?
>
> if that's not possible: how can i get a sequence on the fly? in sybase
> one uses number(*) for that purpose..
>
> ciao, jan
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Jan 15 1999 - 09:41:03 CST
![]() |
![]() |