SELECT <pkfield>,max(field2) as maxfield from <table1> group by <pkfield> into cursor <cursor1>and then...
SELECT <field1> from <table1> where <pkfield> in (select <pkfield> from <cursor1>) into cursor <cursor2>Question is, how can I do this with SQL Server? I'm assuming I won't be able to create a stored procedure on the client's database.