Subject Re: [ib-support] Select
Author Doug Chamberlin
At 05/12/2002 08:42 PM (Sunday), Sandeep wrote:
>I have a stor proc as follow
>...
>select valueA from tableA where fieldA = 2 into :varA;
>
>select valueA from tableA where fieldA = 1 into :varA;
>...
>
>if first statement finds something then varA is set to that value. And if
>the second statement doesn't find anything then I expected it to be set
>to null, but that's not the case. It has the value assigned in first select
>statement.
>
>Is this OK ?

It is OK with me. If there are no records where FieldA=1 then I would not
expect the second statement to do anything with respect to VarA, which is
what you have reported. I think your expectations were erroneous.