473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

OT - ORACLE

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
Nov 15 '07 #1
4 1452
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.
js*******@attglobal.net
==================

Nov 15 '07 #2

"Jerry Stuckle" <js*******@attglobal.netwrote in message
news:67******************************@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.
Nov 15 '07 #3
Hi,

You could probably select rownum.

On Nov 15, 12:30 pm, "Steve" <no....@example.comwrote:
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
Nov 16 '07 #4

"petersprc" <pe*******@gmail.comwrote in message
news:5f**********************************@l1g2000h sa.googlegroups.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.
Nov 16 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
63
by: Nick Palmer | last post by:
Hi all, Is there a DB2 equivilant to Oracle's DB Link functionality ? I have two DB2 databases and I need to get access to the tables in one from the other. In Oracle I would just create a DB...
3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
2
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004...
0
by: Jack | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: Winder | last post by:
Training Classes for Oracle10g, 9i, 8i Certification training in Oracle10g and 9i: DBA, Developer, Discoverer. training conducted at your location worldwide. Courseware licensing also available....
0
by: sathyguy | last post by:
when i type the below in my RHEL AS 4's Firefox 1.5 http://appsworld.ncc.com:7777/forms/...&form=test.fmx iam getting the below error... The requested URL /forms/frmservlet was not found on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.