Subject Re: [firebird-php] comparing column with constant value
Author Lutz Brückner
>>I'd like to use this construction :
>>SELECT userid, username, userid=3 isthis FROM users;
>>
>>Is it possible to get 1 in column isthis when userid=3 ?

with Firebird 1.5 you can do

SELECT userid,
username,
CASE WHEN (userid=3) THEN 1 ELSE NULL END AS isthis
FROM users;

Lutz
--
web based Firebird and InterBase administration: http://ibwebadmin.sf.net


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