Article View: borland.public.interbase.sql
Article #851Re: How to use a an integer parameter to fetch parameter = "N" or all rows.
From: Wayne Niddery [TeamB]
Date: Wed, 30 May 2007 18:29
Date: Wed, 30 May 2007 18:29
16 lines
1641 bytes
1641 bytes
Mitch wrote: > WHERE > ProjectID = :ProjectID and (LocationID = :LocationID or > :all_locations =1 ) > > If I set :all_locations = 0 then only locationID shows. > If I set :all_locations = 1 then all locationIDs show. Didn't think of using a separate parameter purely as a switch. Check the plan on this - I expect it should still be able to use any index you have on locationid, if so then that's the better way to do it. -- Wayne Niddery - Winwright, Inc (www.winwright.ca) "It used to be that other people's achievements were considered an inspiration, not a grievance."
Technical Details
Message-ID:
<465dc28f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<465d29fa$1@newsgroups.borland.com> <465d8a1c$1@newsgroups.borland.com> <465da751$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,d43d3e3c175ab47e X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> From: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> Newsgroups: borland.public.interbase.sql References: <465d29fa$1@newsgroups.borland.com> <465d8a1c$1@newsgroups.borland.com> <465da751$1@newsgroups.borland.com> Subject: Re: How to use a an integer parameter to fetch parameter = "N" or all rows. Date: Wed, 30 May 2007 14:29:35 -0400 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.17.170.228 Message-ID: <465dc28f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1180549775 69.17.170.228 (30 May 2007 11:29:35 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail