Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
First and last based on same SQL
Message
De
10/10/2014 11:13:49
 
 
À
10/10/2014 11:10:51
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01609079
Message ID:
01609139
Vues:
43
>Just to fully understand your requirements: do you want to retrieve FirstPerson and LastPerson for each one of Client.Numero or just for an specific one that is set somewhere else in your application?

This is to extract the first occurence of the field and the last occurence of the field as per one specific master record. So, if a specific master record has 5 child records, the subset will be done from those 5 records. And, to determine which one is subject to be selected, the order is based on AddDate. That's why the second one is DESC.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform