V4MD - <null> results with lingo

Giacomo Vernoni giacomo at way-out.it
Mon Jul 16 11:24:07 CDT 2007


Hi Bart, Hi Ruslan,

my example was stripped down to show the problem; my query gets more  
than one single field.

So, with your solution, I should change every query from

SELECT * FROM tablename WHERE ...

to

SELECT coalesce(fldText1, ""), coalesce(fldText2, ""), [..] colaesce 
(fldTextN), * WHERE...

I understand that this is ONE POSSIBLE solution, but what's the point  
of having a field.getstring() function that doesn't return an empty  
string if a field is empty?

Be also aware that in Director, converting <void> to a string gives  
me an empty string:

put string(void)

-- ""

I have also tried

myText = string(vcursor.field("fld_text").value) -- the field is empty
put myText

-- "<Null>"

So I can't do that neither.

So, the <null> result from vcursor.field("fld_text").value and the  
"<null>" result from vcursor.field("fld_text").getstring() aren't  
correct from my point of view... what do you think about it Ruslan?

Thanks,
Giacomo




On 16 lug 2007, at 16:40, Bart Pietercil wrote:

> I think that should be
>
> SELECT coalesce(fld_text,"")
>
> but read for yourself
>
> <http://databases.aspfaq.com/database/coalesce-vs-isnull-sql.html>
>
>
> Nice suggestion Ruslan, it looks like the vacation is paying  
> off :-) (I want some)
>
> BArt
>
> On 16-jul-07, at 16:33, Ruslan Zasukhin wrote:
>
>> On 16/7/07 4:46 PM, "Giacomo Vernoni" <giacomo at way-out.it> wrote:
>>
>> Hi Giacomo,
>>
>>> Is there a way to get an empty string from an empty or null field?
>>
>> Something like this:
>>
>>     SELECT ifnull( fldText, "" )
>>
>>
>> -- 
>> Best regards,
>>
>> Ruslan Zasukhin
>> VP Engineering and New Technology
>> Paradigma Software, Inc
>>
>> Valentina - Joining Worlds of Information
>> http://www.paradigmasoft.com
>>
>> [I feel the need: the need for speed]
>>
>>
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>


More information about the Valentina mailing list