Subject Bug or my stupidity
Author Stephen Boyd
I am playing around with COALESCE in Firebird 1.5.3. I have a table
with this column:

LD_SHIP_ADDR1 VARCHAR(32) = 'X'

If I execute the following statement in ISQL I get the result that I
expect:

SELECT FIRST (1) COALESCE(LD_SHIP_ADDR1, 'No address') FROM LOADS;

If I put the same statement into a stored procedure like this:

CREATE PROCEDURE TEST() RETURNS (RETVAL VARCHAR(99)) AS
BEGIN
SELECT FIRST (1) COALESCE(LD_SHIP_ADDR1, 'No address') FROM LOADS
INTO :RETVAL;
SUSPEND;
END;

then execute the stored procedure like this:

SELECT * FROM TEST

I get an error:

Conversion error from string "X".

Is this a bug or am I just doing something stupid?