Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get PK Value for unique field value
Message
De
24/09/2004 13:14:28
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Get PK Value for unique field value
Divers
Thread ID:
00945785
Message ID:
00945785
Vues:
51
I have a table that is using UNIQUEIDENTIFIER pk values. There is another character field that has duplicate values in it.

For example (using integer pks for simplicity)
PK   Value
1    a
2    b
3    a
4    c
5    a
I want a query that will give me the first PK value for each unique "Value". So I will get back:
PK
1
2
4
How can I do this?
Thanks,
Dan Jurden
djurden@outlook.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform