Subject Re: stored procedure not exiting where expected
Author csswa
--- In ib-support@y..., "alex_vnru" <ded@h...> wrote:
> --- In ib-support@y..., "csswa" <csswa@y...> wrote:
>
> > Helen, your procedure worked. Oddly, when I ALTERed back to
mine,
> > that now works too. I can only think that altering the procedure
> > fixed it. If I run into this prob again, I'll try the ALTER
> first...
>
> Andrew, your variant tries to compare 'Y' with Null when record
for
> current table is'nt presented in the flag table. It should'nt work
> properly in this case regardless of Alter, seems you checked it
> second time on another data. Helen's is correct.
>
> Best regards, Alexander V.Nevsky.


Yes, you are correct, Alexander. I went back and tested again with
my original SP code, and indeed a blank table (table_options) causes
everything to be logged -- because of the logic error you pointed
out. With all the ALTERing I was doing, I lost track of what I was
supposed to be testing!

Now I fully understand Helen's solution. I also appreciate the
economy of simply *checking* for the existence of a record
configuration (tablename + logging flag set?) instead of the needless
overhead of assigning a variable and working with that, as I had done.

-Andrew Ferguson