Subject Re: [firebird-support] Equivalent of VFP IIF() in FireBird SQL
Author agung wibowo
you can use CASE statement in your SELECT statement, like :
SELECT
(CASE
WHEN amt>5 THEN 1 ELSE 2
END
) AS FLAG

you can read Firebird_v1.5.Release notes for details
----- Original Message -----
From: Namit Nathwani
To: firebird-support@yahoogroups.com
Sent: Monday, December 06, 2004 2:30 PM
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 Sponsor
ADVERTISEMENT





------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

b.. To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




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