Subject Re: [firebird-support] Re: where field = any
Author James
Hi Miroslav,

You got a nice answer here, but concerning on what svein erling posted,
if I had 1=0 will this scan the whole table and slow down the whole thing?

Thanks


James

Miroslav Penchev wrote:

> On Tue, 19 Oct 2004 06:40:07 -0000, Svein Erling Tysvær
> <svein.erling.tysvaer@...> wrote:
>
> >
> >> What about this?
> >>
> >> WHERE 1=1 OR FieldA =:ANY
> >
> > 1=1 will always be true, so every record will be returned regardless
> > of whether FieldA = :ANY or not.
>
> The "real" statement is:
>
> WHERE 1=:ACTIVE_FILTER OR FieldA =:ANY
>
> where :ACTIVE_FILTER is 0 or 1.
>
> --
> Miroslav Penchev
>
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> <http://us.ard.yahoo.com/SIG=129es1q1r/M=294855.5468653.6549235.3001176/D=groups/S=1705115386:HM/EXP=1098289574/A=2376776/R=0/SIG=11ldm1jvc/*http://promotions.yahoo.com/ydomains2004/index.html>
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> * To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>