Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL with aggregates
Message
De
03/09/2013 11:36:20
 
 
À
03/09/2013 11:30:32
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Application:
Web
Divers
Thread ID:
01581896
Message ID:
01581897
Vues:
71
This message has been marked as the solution to the initial question of the thread.
Very quick one....there are several ways....one way (probably not the best for performance, but...)

SUM ( case when Category = 'Capacity' then Total_Cost else 0 end) as Whatever



Again, not great for performance, but I believe it should work.

Alternatively, if that doesn't work, you could do a subquery with the total just for that category, and then join to the subcategory results.

But let me know if that works...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform