>>If you want a more VFP-like solution, I was pleased to learn recently that SQL server 2012 and later supports IIF(), with a syntax exactly like VFP's.
>
>Since majority of my customers still use SQL 2008 (and one is still using SQL 2005) I won't use IIF() in my code. But I am making mental note for the future.
You're lucky. Just until a few months ago I had one diehard with SQL 2000. And still have one with a Windows 2000 server, ouch.
It somehow seems that most of them have skipped 2005 and went straight for 2008, so I consider myself lucky on that side... now that that one with SQL 2000 is busy installing a new one.