Re: Aggregate function question....

  • From: Gints Plivna <gints.plivna@xxxxxxxxx>
  • To: JSweetser@xxxxxxxx
  • Date: Fri, 27 May 2011 15:13:37 +0300

Yep SQL Server has much less ranking functions (SQL Server term :)
than Oracle has analytic functions (Oracle term :).
At least I dont know how to do that without subquery, but probably
row_number() instead of rank() would be better, because with rank()
you can get more than one row with rank = 1.

Speaking about nulls last/first one can use either case construction
in order by clause or isnumeric(order_col) or probably some other
technique. Not so elegant but it works.

Gints Plivna
http://www.gplivna.eu

2011/5/25 Sweetser, Joe <JSweetser@xxxxxxxx>:
> ….for SQL server 2005.
--
//www.freelists.org/webpage/oracle-l


Other related posts: