Case WHEN in SQL SELECT Statement.
Posted on 2012-03-26
I am trying to achieve the following, is this possible....
, SA.SalePrice as Price
, case when SA.Name = 'somename' AND Unitcost > 0
then Case SELECT Result from View1 name WHERE A.MAINID = X
else Case SELECT Result from View2 name WHERE A.MAINID = X AS NewResult