Viewing 4 posts - 271 through 275 (of 275 total)
Please see if this does what you need. If so, might be able to clean it up a little:
SELECT
PersonId,
CASE WHEN NextCalMth...
Scott Pletcher, SQL Server MVP 2008-2010
June 8, 2010 at 3:56 pm
Here is a different approach. Not sure if this will work better or worse than other methods, you'd just have to test it on your own data.
If you don't...
Scott Pletcher, SQL Server MVP 2008-2010
June 8, 2010 at 3:20 pm
SELECT
ClientName,
MAX(CASE WHEN ContactType = 'Home' THEN ContactNumber ELSE 0 END) AS [HomeNumber],...
Scott Pletcher, SQL Server MVP 2008-2010
June 8, 2010 at 2:51 pm
Why not one more variation 🙂 :
SELECT CASE WHEN Port_Value_Total >= 0 THEN Port_Value_Total ELSE 0 END AS Port_Value_Total
FROM (
SELECT SUM(CASE WHEN Port_ID = 3...
Scott Pletcher, SQL Server MVP 2008-2010
June 8, 2010 at 2:44 pm
Viewing 4 posts - 271 through 275 (of 275 total)