Subject Invalid BLOB ID - Is it expected?
Author Fabiano Bonin
Hi all,

Given this procedure:

set term !! ;

create or alter procedure sp_test
returns (
result blob sub_type 1 )
as
begin
result = 'test';
suspend;
end !!

set term ; !!

Are the errors above expected?

select result from sp_test
OK

select substring(result from 1 for 10) from sp_test
OK

select (select substring(result from 1 for 10) from sp_test) from rdb$database
Error - invalid BLOB ID

select cast(result as varchar(10)) from sp_test
Error - conversion error from string BLOB

Regards,

Fabiano.