Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting sub category count
Message
From
07/02/2016 00:43:42
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows 2008 Server
Miscellaneous
Thread ID:
01631008
Message ID:
01631026
Views:
40
>So, do you want to count all subcategories or just top level subcategories? In the former case we're talking about recursive CTE.

The initial purpose was to count, from a parent, the number of first level child. The SQL select command I provided in the other message sums it all. I basically added a COUNT(*) with a LEFT JOIN. It is just that this forces me to MIN() all the extra fields I want or to switch into a sub select as you mention.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform