Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting sub category count
Message
 
 
À
06/02/2016 11:15:50
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows 2008 Server
Divers
Thread ID:
01631008
Message ID:
01631021
Vues:
46
>I have a list of categories. Some of them have sub categories. When I select the categories, I need to include a count field which would indicate either 0, if there is no sub category for that category, or a count indicating how many sub categories that category has. I am looking for the most effective simple SQL syntax for that.

Can you post the structure of the table(s) involved here to determine when category has subcategories?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform