Subject Re: [firebird-support] Re: fail when checking VarChar variable <> ''
Author Helen Borrie
At 04:23 AM 8/12/2006, you wrote:
>No the problem is not in the if body.
>
>If I eliminate the test altogether, the procedure does not fail.
>
>Even if I do nothing inside the body of the if statement, it fails on
>the if (InternalMemo <> '') line.

Is it possible that, in your code, your actual test is using a wrong
character for the apostrophe? It's left-field...but...

As a way to work out what's really going on here, try replacing the
"null replacement" in your coalesce expression with a string you can
positively identify, like '<null>', and then test for that, i.e.,
...,
Coalesce(SubString(O.MEMO_INTERNAL From 1 For 1990),'<null>')
into ... :InternalMemo

..then...

if (InternalMemo <> '<null>') then ...

./heLen