Subject Re: Bug or my stupidity
Author Stephen Boyd
Now I think that I must be going crazy. I tried your suggestion to
wrap the COALESCE in CAST() and it worked. So, I'm thinking 'That is
wierd' and I start to play around with it some more. Eventually I
changed it back to what it was originally and now it works. I swear
that I can't see any difference from what was there before to what is
there now.

Unless this start to act up again, I'm going to have to assume that I
fat fingered something and was too stupid to see it.

Thanks for your help.

> I think it should work too :-/
>
> I would try two things to "fix" it:
> 1.) Use Substring to force the size
> 2.) Use Cast
>
>
> CREATE PROCEDURE TEST() RETURNS (RETVAL VARCHAR(99)) AS
> BEGIN
> SELECT FIRST (1) Substring(COALESCE(LD_SHIP_ADDR1, 'No address')
from 1 for 99) FROM LOADS
> INTO :RETVAL;
> SUSPEND;
> END;
>
>
> CREATE PROCEDURE TEST() RETURNS (RETVAL VARCHAR(99)) AS
> BEGIN
> SELECT FIRST (1) CastSubstring(COALESCE(LD_SHIP_ADDR1, 'No
address') from 1 for 99) as varchar(99)) FROM LOADS
> INTO :RETVAL;
> SUSPEND;
> END;
>
>
> Really don't know why it is complaining, does the LD_Ship_Addr1 has a
> different charset (or something like it) ?
>
> see you !
>
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>