Subject starting '' has different behavior for 'free' select and select in SP!!!
Author vincent_kwinsey
Hello,

I have just observed, that upon the relation TEST(ID INTEGER, CODE
VARCHAR(24)):
1) select * from TEST where CODE starting '';
gives all the rows - as one can expect

2)
create procedure TESTS1
returns (id integer)
as begin
for select id from TEST
where CODE starting ''
into :id
do begin
suspend;
end
end

select * from TESTS1;
gives all the rows - as one can expect

3)
create procedure TESTS2
(code varchar(24))
returns (id integer)
as begin
/* one can make here the explicit assignment code='';, but this
doesn't help too!!! */
for select id from TEST
where CODE starting :code
into :id
do begin
suspend;
end
end

select * from TESTS2('');
gives zero rows! This is a bit strange - because, if one uses the
variable in stored procedure with value '', then FB perceives it as
null, I guess. Maybe I am not understading the difference
among '', ' ' and null quite well, but one can see, that 2) and 3)
cases gave equal results for Interbase, but they give different
results for FB. I am using FB 1.5.5 now.

Yes, one can simply make adaptation of procedure's code for FB simply
by replacement of starting '' with like '%', I guess, there is no
changes in performance too.

Is this bug?