'Dynamic' Where (was Hey! Long time since...)
devlists at reely.com
devlists at reely.com
Fri Feb 6 14:22:46 CST 2009
I vaguely recall this. Based on all the optional input requirements,
you'll be stuck with the wild case statement structure.
If you come up with a more elegant solution, please share it. I like to
learn new ideas. :)
I haven't done PH work since leaving Lattice, so I can't recall some
details, like can you use the request statement with cursors.
Darren Reely
>
> 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/--
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l at lists.sowder.com
> Subscribe: 'subscribe' in message body to
> powerh-l-request at lists.sowder.com
> Unsubscribe: 'unsubscribe <password>' in message body to
> powerh-l-request at lists.sowder.com
> http://lists.sowder.com/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
> Add 'site:lists.sowder.com powerh-l' to your search terms to search the
> list archive at Google.
More information about the powerh-l
mailing list