[dba-SQLServer] Iif in SQL Server

Francisco Tapia fhtapia at gmail.com
Wed Sep 22 00:30:28 CDT 2004


JOHN!

I know you're busy these days but it works like this


SELECT CASE WHEN FIELD = 'value' THEN FieldWhenTrue
                        WHEN Fieldothercase = 'othervalue THEN
FieldWhenOtherValue
                        ELSE FieldwhenELSE
               END AS AliasName,
             Next Field

>From TableName




On Wed, 22 Sep 2004 11:45:36 +1000, Stuart McLachlan
<stuart at lexacorp.com.pg> wrote:
> On 21 Sep 2004 at 21:38, John W. Colby wrote:
> 
> > Sorry, my Outlook is totally screwed up
> 
> That's tautology. <grin>
> 
> 
> 
> 
> --
> Stuart
> 
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
> 
> 



-- 
-Francisco
http://ft316db.VOTEorNOT.org



More information about the dba-SQLServer mailing list