SQLServerCentral » Latest topics
Simplifying a CASE statement
Hi I'm new to CASE statements and wondering if the following can be simplified:
SELECT CASE WHEN ExchangeRate > 0 THEN Sales_Price / ExchangeRate ELSE Sales_Price END AS Sales_Price,
SELECT CASE WHEN ExchangeRate > 0 THEN Sales_Price / ExchangeRate ELSE Sales_Price END AS Sales_Price,
No comments:
Post a Comment