× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm trying to format a host variable to support the IN keyword (I'm
using hard-coded IN statements without problem).  The hard-coded
expression would be "...where type in('FL','WA','PA')"; I want to
build the IN keyword predicate dynamically for eventual use in a CASE
statement.

My prototype program has this code:
"Declare Input cursor for select order, state from Orders where state
in :state_list"

It compiles but ti doesn't work

I can built a series of CASE statements to get around this, but I have
one of those feelings (again) that I've overlooked something.

I'd greatly appreciate a working example of using a host variable with
the IN keyword.

Also, is there any way I can view the evaluated SQL statement?  I'm
trying various combinations of things but I'm not getting any SQL
errors; it would be handy to see what SQL is trying to do.

Thanks,
Reeve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.