Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Include Count Of Records In this Query
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Include Count Of Records In this Query
Divers
Thread ID:
01399490
Message ID:
01399490
Vues:
105
Ok, so now I have this query
	SELECT LH.* 
		FROM LocationHistory LH 
		INNER JOIN (SELECT MAX(Sequence) AS Sequence, PartID, SerialNo 
			FROM LocationHistory  
			GROUP BY PartID, SerialNo ) Derived 
				ON LH.Sequence = Derived.Sequence and 
				   LH.PartID = Derived.PartID and 
				   LH.SerialNo = Derived.SerialNo
I want to include as part of the result set a count of all records of each PartId/SerialNo combination
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform