Nested Case and SUM
One of the important distinctions to remember is that T-SQL does not have a CASE statement, it has a CASE Expression. It seems like a subtle difference, but, a very important one. Like all...
View ArticleNested Case and SUM
HI Skala !You may use below query to get your desired output; But to be sure you can't use Subqueries in THEN Clause. CREATETABLE #Temp(Col1 INT,Col2 INT, Col3 VARCHAR(10))--TRUNCATE TABLE...
View ArticleNested Case and SUM
Please post sample data + desired result, always state what version you are usingBest Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
View ArticleNested Case and SUM
Hi,i'm a begginer i T-SQL so question is can I use case in this way:...CASEWHEN SUM(COLUMN1*COLUMN2)=1 AND COLUMN3='XXXX'THEN (subquery)WHEN SUM(COLUMN1*COLUMN2)=1 AND COLUMN3='YYYY'THEN (subquery)ELSE...
View Article
More Pages to Explore .....