I need to pull Top n (lets say three) from an oracle 8i db.Now SQL Server
makes this really easy to do.How would I go about doing it in Oracle?I
have tried sub selects and rownum and stuff, but the order gets al hosed up
if I use those.Basically I need them ordered by date desc.
Any help would
On Wednesday 15 Oct 2003 12:39 pm, Heald, Tim wrote:
I need to pull Top n (lets say three) from an oracle 8i db.Now SQL Server
makes this really easy to do.How would I go about doing it in Oracle?I
have tried sub selects and rownum and stuff, but the order gets al hosed up
if I use
AM
To: CF-Talk
Subject: Re: Top n in Oracle
On Wednesday 15 Oct 2003 12:39 pm, Heald, Tim wrote:
I need to pull Top n (lets say three) from an oracle 8i db.Now SQL
Server
makes this really easy to do.How would I go about doing it in Oracle?I
have tried sub selects and rownum and stuff
did you try ... where rownum = 3 ... ?
-Original Message-
From: Heald, Tim [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:27 PM
To: CF-Talk
Subject: RE: Top n in Oracle
The table has something like 250,000 records.The performance would make
that impossible.
Timothy
On Wednesday 15 Oct 2003 13:27 pm, Heald, Tim wrote:
The table has something like 250,000 records.The performance would make
that impossible.
Have you looked at the docs for cfquery ?
In particular maxRows ?
If you query can't return 250K rows in something like stright away, you need
to look
Subject: RE: Top n in Oracle
did you try ... where rownum = 3 ... ?
-Original Message-
From: Heald, Tim [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:27 PM
To: CF-Talk
Subject: RE: Top n in Oracle
The table has something like 250,000 records.The performance would make
There are some solutions at http://www.orafaq.org/faqsql.htm.
-Original Message-
From: Murat Demirci [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:32 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Top n in Oracle
did you try ... where rownum = 3 ... ?
-Original Message
--
-Original Message-
From: Heald, Tim [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 8:27 AM
To: CF-Talk
Subject: RE: Top n in Oracle
The table has something like 250,000 records.The performance would make
that impossible.
Timothy Heald
Information Systems Manager
]
Sent: Wednesday, October 15, 2003 8:38 AM
To: CF-Talk
Subject: Re: Top n in Oracle
On Wednesday 15 Oct 2003 13:27 pm, Heald, Tim wrote:
The table has something like 250,000 records.The performance would make
that impossible.
Have you looked at the docs for cfquery ?
In particular maxRows ?
If you
PROTECTED]
Sent: Wednesday, October 15, 2003 7:38 AM
Subject: FW: Top n in Oracle
There are some solutions at http://www.orafaq.org/faqsql.htm.
-Original Message-
From: Murat Demirci [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:32 PM
To: '[EMAIL PROTECTED]'
Subject: RE
SELECT *
FROM
(
SELECT WHATEVER, YOU, NEEED
FROM tablename
)
WHERE rownum 4;
Do your ordering in the inner query.
-Original Message-
From: Heald, Tim [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 7:40 AM
To: CF-Talk
Subject: Top n in Oracle
I need to pull Top n (lets
SELECT * FROM
( SELECT *
FROM foo
WHERE goo = 'koo'
ORDER BY gooey
)
WHERE rownum 101
- Original Message -
From: Heald, Tim [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 6:39 AM
Subject: Top n in Oracle
I need to pull Top n (lets say three) from
these
opinions been approved or sanctioned by these organizations. This e-mail is
unclassified based on the definitions in E.O. 12958.
-Original Message-
From: Deanna Schneider [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 9:38 AM
To: CF-Talk
Subject: Re: Top n in Oracle
SELECT
I need to pull Top n (lets say three) from an oracle 8i db.Now SQL Server
makes this really easy to do.How would I go about doing it in Oracle?I
have tried sub selects and rownum and stuff, but the order gets al hosed up
if I use those.Basically I need them ordered by date desc.
Any help would be
14 matches
Mail list logo