nal Message-
Sent: Thursday, January 10, 2002 1:23 PM
To: Multiple recipients of list ORACLE-L
Don't use any aliases (x in your case) and try again
Regards
-Original Message-
Sent: Thursday, January 10, 2002 12:32 PM
To: Multiple recipients of list ORACLE-L
Subject: RE:
You may be right, that's the version issue
-Original Message-
Sent: Thursday, January 10, 2002 12:32 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: SQL for top 100 values
I tried to run it in Oracle 7.3.4, it comes up with a syntax error
Here is th
This was a new feature in Oracle8i. In 7.3 the best way would be to open
a cursor that sorted the data and return the first N rows.
Sorry,
John
[EMAIL PROTECTED] wrote:
I tried to run it in Oracle 7.3.4, it comes up with a syntax errorHere is the SQLselect x.fein,x.open_balfrom (sel
Deen Dayal wrote:
>
> I tried to run it in Oracle 7.3.4, it comes up with a syntax error
>
> Here is the SQL
> select x.fein,x.open_bal
> from (select sf_get_fein(employer_id) fein, nvl(total_open_balance_amt,0)
>open_bal
> from employer
> order by open_bal desc ) x
Don't use any aliases (x in your case) and try again
Regards
-Original Message-
Sent: Thursday, January 10, 2002 12:32 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: SQL for top 100 values
I tried to run it in Oracle 7.3.4, it comes up with a syntax error
Correction : SELECT * FROM (SELECT DISTINCT VALUES FROM TABLE ORDER BY
VALUES DESC) WHERE ROWNUM < 101;
-Original Message-
Sent: Thursday, January 10, 2002 11:51 AM
To: Multiple recipients of list ORACLE-L
Subject: Re: SQL for top 100 values
SELECT * FROM (SELECT VAL
I tried to run it in Oracle 7.3.4, it comes up with a syntax error
Here is the SQL
select x.fein,x.open_bal
from (select sf_get_fein(employer_id) fein, nvl(total_open_balance_amt,0) open_bal
from employer
order by open_bal desc ) x
where rownum < 101
Here is what
SELECT * FROM (SELECT VALUES FROM TABLE ORDER BY VALUES) ROWNUM < 101;
Deen Dayal
Or use KdB.
-Original Message-
Sent: Thursday, January 10, 2002 11:26 AM
To: Multiple recipients of list ORACLE-L
If using 8i
SELECT * FROM
(SELECT *
FROM
ORDER BY DESC)
WHERE rownum <= 100;
Rick
"Deen Dayal"
<[EMAIL PR
Use ORDER BY DESC
and, of course, rownum < 101 :-)))
--
SELECT NAME, VALUE FROM (
SELECT NAME, VALUE FROM TOP100 ORDER BY VALUE DESC
) WHERE ROWNUM < 101
JP
On Thu 10. January 2002 17:03, you wrote:
> hi SQL wizards,
>
> Can any body help me with the tjis SQL. I need a SQL rec
Deen,
You could try SELECT fields... FROM
(SELECT field1 FROM table1 ORDER BY field1)
WHERE rownum > 100; ( the value is 100 less that
number of rows returned)
That will order the rows returned by the value in the field1
and then give you the row numbers of the returned rows that are greate
- Original Message -
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Thursday, January 10, 2002 18:03
> hi SQL wizards,
>
> Can any body help me with the tjis SQL. I need a SQL records with top 100
values of a table ( not rownum < 101 ).
u do need rownum
select *
f
Deen Dayal wrote:
>
> hi SQL wizards,
>
> Can any body help me with the tjis SQL. I need a SQL records with top 100 values of
>a table ( not rownum < 101 ).
>
> Thanks
> Deen
>
rownum < 101 is OK if you nest your query, ORDER BY included, as an
in-line view,
ie
select x.val
from (se
If using 8i
SELECT * FROM
(SELECT *
FROM
ORDER BY DESC)
WHERE rownum <= 100;
Rick
"Deen Dayal"
14 matches
Mail list logo