SQL query IFNULL

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Oct 7 17:12:59 CDT 2004


On 10/7/04 1:33 PM, "Gregoire William" <wgregoire at paris.mediagerance.com>
wrote:

Hi Gregoire,

> i bump this one year old message because i currently have the same prblem...
> 
> i'm trying to do a
> SELECT IFNULL(name,'rien')
> but i read on ValentinaList you need a BaseObject methods




> I modified the "005 (Methods)" example :
> I removed the data of "frank" and modified nameUpr to have

> "jon    roberts    26/06/2001 16:41:12    JON    ROBERTS    2001    "
> "    schima    27/06/1998 16:41:12    rien    SCHIMA    1998    "
> 
> 1/
> with set fldRef = addField(gDB, ArtistRef, "nameUpr", #kTypeString, 20, 0,
> "IF(name is null, name,'rien')" ) , I have
> 
> "jon    roberts    26/06/2001 16:41:12    rien    ROBERTS    2001    "
> "    schima    27/06/1998 16:41:12    rien    SCHIMA    1998    "
> 
> 
> 2/
> with set fldRef = addField(gDB, ArtistRef, "nameUpr", #kTypeString, 20, 0,
> "IFnull(name,'rien')" ) , i have
> 
> "jon    roberts    26/06/2001 16:41:12    jon    ROBERTS    2001    "
> "    schima    27/06/1998 16:41:12        SCHIMA    1998    "
> 
> 
> 
> 
> what's wrong ?!

What you expect and what you get ?

    IFnull(name,'rien') will return 'rien' only if field name is NULL.
            

You have remove Frank... Where and how ?

    you sure that you have set it to NULL ?
    may be it is empty string ?


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