[dba-SQLServer] Re: Top two of each group

Robert L. Stewart rl_stewart at highstream.net
Thu May 27 14:02:50 CDT 2004


I do not have it with me or I would send it.  But, check out teh book "The 
Guru's guide to Transact-SQL"  He has a non-cursor solution for it.

At 12:00 PM 5/27/2004 -0500, you wrote:
>Date: Wed, 26 May 2004 15:21:38 -0700
>From: Francisco H Tapia <my.lists at verizon.net>
>Subject: Re: [dba-SQLServer] Top two of each group
>To: dba-sqlserver at databaseadvisors.com
>Message-ID: <40B51872.4050109 at verizon.net>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>I did this with a cursor in the end... :( I'm sure there IS a way to do
>this otherwise, but I haven't invested more time into it, plus this
>makes it usable it returns the recordset in under 3 seconds so it seems
>fine, tho I would prefer a NON-CURSOR approach. :\ oh well.
>
>Here is the syntax that I used..
>





More information about the dba-SQLServer mailing list