Home » RDBMS Server » Server Administration » Re: serial number in SQL reports
Re: serial number in SQL reports [message #373596] Wed, 25 April 2001 12:06
Andrew again...
Messages: 270
Registered: July 2000
Senior Member
Your queries are more than likely ordered. To use rownum, you will need to include it at a higher level than your ORDERed query.

e.g. if your query is
"select A from ABC order by A desc;", then to get rownum to work you need to run:
"select rownum, qry.* from (select A from ABC order by A desc) qry;"

In earlier versions of oracle a similar effect can be had using a "group by" rather than an "order by" although it's a little restrictive.
Previous Topic: Re: serial number in SQL reports
Next Topic: Re: serial number in SQL reports
Goto Forum:
  


Current Time: Mon Dec 23 10:31:30 CST 2024