SQL more... problem with <NULL> V4MD1
Ruslan Zasukhin
sunshine at public.kherson.ua
Sat Nov 4 12:41:10 CST 2006
On 11/4/06 12:14 PM, "Florian Bogeschdorfer" <fb at memedia.de> wrote:
Hi Florian,
> Hi Ruslan!
>
> This week you answered me a question, which you solved with outer join.
>
> Now I have something like "SELECT NAME,CRD_NUMBER FROM KUNDEN,KARTEN WHERE
> KD_ID*=CRD_KD_ID"
>
> The result would be
>
> Bogeschdorfer,1234 (e.g. if record in KARTEN exists with link to KUNDEN)
>
> Or
>
> Bogeschdorfer,<NULL> (if no record in KARTEN exists for KD_ID)
>
> So far so good. The problem is <NULL>. As we have discussed a year ago on
> this list, this is no valid Director value, in Director it should be VOID.
> However I know you won't fix this anymore. But this value breaks parts of my
> code and the only way would be to check every possible field if the value is
> <NULL> and make it void or "<NULL>". But I am talking about export routines
> for 100000s of records. If I have to check every record with some fields
> against <NULL> results it would take several minutes.
>
> So what can I do. Is there a SQL way to replace the <NULL>? Like
>
> SELECT NAME,CRD_NUMBER FROM KUNDEN,KARTEN WHERE KD_ID*=CRD_KD_ID REPLACE
> VALUE <NULL> WITH 0
It seems there was function ifnull()
Which do what you ask for
--
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]
More information about the Valentina
mailing list