473,769 Members | 4,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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...any way, 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 1470
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...any way, 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*******@attgl obal.net
=============== ===

Nov 15 '07 #2

"Jerry Stuckle" <js*******@attg lobal.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...an yway, 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...any way, 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*******@gmai l.comwrote in message
news:5f******** *************** ***********@l1g 2000hsa.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.
Nov 16 '07 #5

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

Similar topics

3
5228
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 luck yet. Here is a short description of what I did so far: 1. I installed the jdk118_v3-glibc-2.1.3.tar in the /usr/local/ dir and made a symbolic link from /usr/local/java to this 2. I installed all the necessary groups and users (oracle,...
4
19994
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
25663
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 Link between the two instances. Is such a thing possible between two DB2 databases ? Thanks in advance, Nick
3
23457
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 Access-tables. I have tried this: conn.Provider = "Microsoft.Jet.OLEDB.4.0" conn.ConnectionString = "data source=" & datafil & ";Jet OLEDB:Database Password=" conn.Open datafil
13
7480
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. Using the exact same code (copy and paste) into a Web app I get the following error "Error while trying to retrieve text for error ORA-01019". Security I thought, so I use Impersonation on the Web site, then the aspnet_wp.exe crashes with "The...
2
14250
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: Additional Array INSERT and SELECT Syntax Support by Pro*C/C++ and Pro*COBOL Precompilers: Dynamic SQL Statement Caching in Pro*C/C++ and Pro*COBOL Precompilers: Fix Execution Plan in Pro*C/C++ and Pro*COBOL Precompilers: Flexible B Area Length...
2
3569
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 rd@stat2.scn.ru:/usr/src/sys/i386/compile/RDSTAT2-ORACLE i386 uname -a under oracle user : Linux stat2.scn.ru 2.4.2 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004 i686 unknown
0
3321
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. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
3296
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. http://a.uuload.com/Oracle-Database.htm Unlock the Value of Your IT System Confio Software's Ignite for Oracle uses wait-event analysis to improve database performance by 65% or more. Gain visibility of every Oracle wait event. Download free...
0
4644
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 this server. formsweb.cfg contents...... baseHTML=/u01/app/oracle/OraHome_1/forms/server/base.htm
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7409
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3562
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.