SQL query IFNULL

Martin Kloss martin.kloss at gmx.de
Wed Oct 29 14:29:44 CST 2003


At 14:03 29.10.2003, you wrote:
>You can use functions only in BaseObject methods.
>You need create BaseObject method and use it in SELECT.

ok, I created a method "has_comment" with the calculation:

IF(comment != '', 'j', 'n')

But when selecting the records:

SELECT id, has_comment FROM data

all I get is "j", but some records don't have any data in the
field, so I assume it's empty.

IF(comment IS NULL, 'n', 'j')

gives me the same result.

Martin.


Martin Kloss

Need music? http://www.selling-sound.com

Like the author? Buy the book at:
http://www.amazon.de/exec/obidos/ASIN/3898422194/lingmmugd

Get your daily dose of Lingo at the LingoPark:
http://www.lingopark.de





More information about the Valentina mailing list