Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select First Record
Message
De
03/06/2001 09:17:49
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00514286
Message ID:
00514309
Vues:
11
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform