'Dynamic' Where (was Hey! Long time since...)
Karen Barrett
kbarrett00 at hotmail.com
Thu Feb 5 12:35:56 CST 2009
Thanks Ken, that is a good tip I certainly can use sometime. I will see if I can work it in here.
What I'm dealing with is 8 variables that the user can put values into. For each field that is not null I take the value and create "and city like :input1" to append to my exisiting where clause. They are not exclusive.
I'm trying to avoid building a gigantic Case statement which is what I think using Darren's approach would require. His logoc has a very simple append to the declared SQL (::and_where_clause) but in the find procedure you then load the sql open statement as follows
sql open xyz and_where_clause(and city like :input1)
I'm sort of hoping I can load up a temp input99 with inputs 1-8 and just do sql open xyz and_where_clause(:input99)
I'm trying several things today, will let the list know if I get them to work.
I've never built a search screen with Quick before so new territory even though I'm a 20 year PH vet.
Karen
> I am not sure exactly what you are trying to achieve, but I have a screen
> were the user can change the way in which records are retrieved. I use a
> UNION ALL with a temporary variable to make this work.
>
> Maybe this would work in your case.
>
> Ken
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20090205/eb41d198/attachment.html
More information about the powerh-l
mailing list