Re: if statement

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 12/05/04


Date: Sun, 5 Dec 2004 21:18:44 -0000

Use a CASE expression. For example:

 CASE WHEN col1 = 0 THEN col2 ELSE col1 END

-- 
David Portas
SQL Server MVP
--