[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Passing Variables to Inline Views
I believe 'Dynamic SQL' is the answer here. I have not tested this, but I
think this will work.
The show statement should look like this:
$var1 = 'aaa','bbb'
let $Q = chr(39)
let $var1 = $Q || 'aaa' || $Q || ',' $Q || 'bbb' || $Q
show '$var1 = ' $var1
begin-select
.
.
.
from table_a a,
table_b b,
(select col1, col2, col3 col4
from table_c, table_d
where col5 in ([$var1])) c
-----Original Message-----
From: CARFREH1@nationwide.com [mailto:CARFREH1@nationwide.com]
Sent: Tuesday, January 07, 2003 4:11 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Passing Variables to Inline Views
Here is a problem I am running into right now:
begin-select
.
.
.
from table_a a,
table_b b,
(select col1, col2, col3 col4
from table_c, table_d
where col5 in $var1) c
where
.
.
.
This will not pass the var1 values ('aaa','bbb','ccc'...) into the inline
view properly as no data is returned. however if a single value is passed:
where col5 = $var1
It works fine.
I have tried messing with single quotes, [ and ] and [$where] clauses and
none have worked. Could really use some help at this point.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users