Re: Aggregate function question....

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Fri, 27 May 2011 15:13:37 +0300
Message-ID: <BANLkTi=Jiug_7MYUD1doD1W81LrmEpcO2w_at_mail.gmail.com>



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_at_icat.com>:
> ….for SQL server 2005.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 27 2011 - 07:13:37 CDT

Original text of this message