SQL query IFNULL

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Oct 29 15:35:03 CST 2003


on 10/29/03 15:29, Martin Kloss at martin.kloss at gmx.de wrote:

> 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.

Try to check on small db with VAPP.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list