Subject Re: [ib-support] Bug in stored procedure
Author Gerhardus Geldenhuis
Svein Erling Tysvaer wrote:
> At 15:12 10.01.2003 +0200, you wrote:
>
>>Hi
>>I am still using FB1 where the problem is.
>>
>>This line of code is in a for select statement
>>
>>select VEHICLE_REGISTRATION_NO from DAR
>> where darno = (select darno from CONVERTTORONUMBER where ronno
>>= :DARNO_RONO) into :VehicleRegistration
>
>
> Why not simply do
>
> select VEHICLE_REGISTRATION_NO from DAR D
> join CONVERTTORONUMBER C on C.DARNO=D.DARNO
> where C.RONNO = :DARNO_RONO
> into :VehicleRegistration
>
> HTH

I could do it. Would it be faster than the where statement. With the
data I have there is no difference in the time taken to do the query. It
is to difficult to create test data for the db without a lot of extra
work so I cant test the performance difference. Thus any answer would be
theoretical.

It does give the correct results however.

I am concluding that there is a bug in how FB1 handles this specific
where clause. Even following Helen's advice and adding aliases for the
different tables does not give the corrects results.

I should probably get FB1.5 and test it...

Groete
Gerhardus