Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select First Record
Message
From
03/06/2001 09:17:49
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00514286
Message ID:
00514309
Views:
10
It would be much easier if you had a "verbal" definition of First Record. What is the exact definition of a group?

Is it (code1, year)? Can you add an IDENTITY column to the table?

SELECT *
FROM table1
WHERE identcol = (
SELECT TOP identcol
FROM table1 t
WHERE t.code1 = table1.code1
AND t.year = table1.year
ORDER BY code2)

Or something like that <s>

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform