Subject RE: [firebird-support] Equivalent of VFP IIF() in FireBird SQL
Author Wilhelm Tomasi
Use CASE statements.

SELECT (CASE WHEN Amt>5 THEN 1 ELSE 2 END) as Flag

-----Original Message-----
From: vso_ad1@... [mailto:vso_ad1@...] On Behalf Of
Namit Nathwani
Sent: 6 decembrie 2004 09:31
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Equivalent of VFP IIF() in FireBird SQL


Hi all

I would like to know if there is an equivalent to Immediate IF of VFP for
FireBird for eg.

SELECT IIF(Amt > 5, 1, 2) AS Flag

So flag will contain 1 if the amt col is greater than 5 else flag will
contain a 2

Please advise.




Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://ahmedabad.sancharnet.in/vso_ad1/
namitbn@...
___________________________________________

----------


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 05/12/2004


[Non-text portions of this message have been removed]





Yahoo! Groups Links