Hello there. I see that mysql has this kind of thingIF(winter>500, "Sells", "Slow")
I am aware of CASE command but i would like to have above code in SqlServer. Is there any way that it can be defined as function. Can you suggest me how this could be done ?I tried with creating function IFF( bit, varchar, varchar ) but then you cant put expressions as function arguments...Let me put it in example. Lets say I want to have 1 returned if count(*) > 1 otherwise 0. I could put it like:SELECT IFF(Count(*) > 0, 1, 0) FROM table
Thank youwww.r-moth.com http://r-moth.deviantart.com