Quantcast
Channel: Nested Case and SUM
Browsing latest articles
Browse All 4 View Live

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 Article



Nested 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 Article

Nested 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 Article

Nested 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
Browsing latest articles
Browse All 4 View Live




Latest Images