Set Sqlstring = "select * from " concat library concat "/filename where key = ?"
Prepare s1 for sqlstring
Declare c1 cursor for s1
Open c1 using (somevariable)
Something along those lines.
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James Lampert
Sent: Friday, April 29, 2011 12:05 PM
To: Midrange Systems Technical Discussion
Subject: Another SQL-newbie UDF question: qualifying with a library passed as a variable
Situation: I have a UDF that, because it's using unqualified filenames
on SELECTs, can get confused about where to go for its data, if the
library list is the list bit funky.
But the target library is not known at creation time.
I'd like to pass the library as a parameter. But is there a way to
qualify the filename on a SELECT, using a variable (in this case, a
parameter) as the library name?
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
Notice from Bob Evans Farms, Inc: This e-mail message, including any attachments, may contain confidential information that is intended only for the person or entity to which it is addressed. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.