>>Hi Dan,
>>
>>But I thought that IIF() only works with VFP; and for SQL Server stored procedure I need a CASE.
>>Did I miss something?
>>Thanks,
>>
>
>I believe MS added IIF in SQL 2012, though I think it was more for the Access crowd, to make their queries portable.
>
>IIF isn't part of the ANSI standard, though I'm definitely guilty of using T-SQL extensions.
>
>I realize this is a matter of style, but my 2 cents is that code using CASE statements shouldn't be changed to use IIF.
>
>If someone can demonstrate functional or performance advantage, I'd be curious to see. But I wouldn't recommend changing if that can't be demonstrated.
Thank you for your input. I will keep CASE in my SP. Some of my customers still use SQL 2008; so I would not want anything to be broken. And your 2 cents input is appreciated.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham