OT - ORACLE
am 15.11.2007 18:30:22 von Steve
i know i know...just get over it. look at the date of the last post/response
in an oracle ng. :)
this is a mysql specific query. i want to do the same thing in oracle. i
don't know how. the following gives a dynamic/unique id number to a set of
selected records. it kind of mimics RANK() in oracle. it's based on a
cartesian...anyway, if anyone can fill me in on a similar oracle translation
to this mysql query, i'd just about break down and cry from joi.
tia
=============
SELECT @id := @id + 1 Id ,
Value
FROM
(
SELECT @id := 0
) uniqueId ,
(
SELECT 'ABC' Value
UNION
SELECT 'DEF' Value
UNION
SELECT 'GHI' Value
) pseudoTable
Re: OT - ORACLE
am 15.11.2007 23:21:09 von Jerry Stuckle
Steve wrote:
> i know i know...just get over it. look at the date of the last post/response
> in an oracle ng. :)
>
> this is a mysql specific query. i want to do the same thing in oracle. i
> don't know how. the following gives a dynamic/unique id number to a set of
> selected records. it kind of mimics RANK() in oracle. it's based on a
> cartesian...anyway, if anyone can fill me in on a similar oracle translation
> to this mysql query, i'd just about break down and cry from joi.
>
> tia
>
> =============
>
> SELECT @id := @id + 1 Id ,
> Value
> FROM
> (
> SELECT @id := 0
> ) uniqueId ,
> (
> SELECT 'ABC' Value
> UNION
> SELECT 'DEF' Value
> UNION
> SELECT 'GHI' Value
> ) pseudoTable
>
>
>
Steve,
comp.databases.oracle.server seems to have quite a bit of traffic.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: OT - ORACLE
am 15.11.2007 23:51:02 von Steve
"Jerry Stuckle" wrote in message
news:67ydnT9pOvUSW6HanZ2dnUVZ_vzinZ2d@comcast.com...
> Steve wrote:
>> i know i know...just get over it. look at the date of the last
>> post/response in an oracle ng. :)
>>
>> this is a mysql specific query. i want to do the same thing in oracle. i
>> don't know how. the following gives a dynamic/unique id number to a set
>> of selected records. it kind of mimics RANK() in oracle. it's based on a
>> cartesian...anyway, if anyone can fill me in on a similar oracle
>> translation to this mysql query, i'd just about break down and cry from
>> joi.
>>
>> tia
>>
>> =============
>>
>> SELECT @id := @id + 1 Id ,
>> Value
>> FROM
>> (
>> SELECT @id := 0
>> ) uniqueId ,
>> (
>> SELECT 'ABC' Value
>> UNION
>> SELECT 'DEF' Value
>> UNION
>> SELECT 'GHI' Value
>> ) pseudoTable
>
> Steve,
>
> comp.databases.oracle.server seems to have quite a bit of traffic.
thanks jerry...i didn't see that one listed. i'll give it a shout.
thanks again.
Re: OT - ORACLE
am 16.11.2007 03:42:00 von petersprc
Hi,
You could probably select rownum.
On Nov 15, 12:30 pm, "Steve" wrote:
> i know i know...just get over it. look at the date of the last post/response
> in an oracle ng. :)
>
> this is a mysql specific query. i want to do the same thing in oracle. i
> don't know how. the following gives a dynamic/unique id number to a set of
> selected records. it kind of mimics RANK() in oracle. it's based on a
> cartesian...anyway, if anyone can fill me in on a similar oracle translation
> to this mysql query, i'd just about break down and cry from joi.
>
> tia
>
> =============
>
> SELECT @id := @id + 1 Id ,
> Value
> FROM
> (
> SELECT @id := 0
> ) uniqueId ,
> (
> SELECT 'ABC' Value
> UNION
> SELECT 'DEF' Value
> UNION
> SELECT 'GHI' Value
> ) pseudoTable
Re: OT - ORACLE
am 16.11.2007 15:02:44 von Steve
"petersprc" wrote in message
news:5f473ee1-5d07-415d-87ec-8c4a30ff061e@l1g2000hsa.googleg roups.com...
> Hi,
>
> You could probably select rownum.
damn it! you're right! i had tried rowid at first...i couldn't remember what
it was called. rowid, of course, is and alphanum result. rownum is exactly
it...and it worked.
thanks.