Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
I have query
Select
x
,
y
,
z
,
w
from
table_nameWhere
(x
=900
)AND
( (y
='F01'
)OR
(y
='CIP'
)OR
(y
='T01'
)OR
(y
='U01'
)OR
(y
='L01'
))I want to contextialize my variable x and y .
I know that my query would be
Select
x
,
y
,
z
,
w
from
table_nameWhere
(context.x
=900
)AND
( (context. y='F01'
)OR
(context.y='CIP'
)OR
(context.y='T01'
)OR
(context.y='U01'
)OR
(context.y='L01'
))How could i put different values into the same context variable X ?
Hi ,
first :
AND
( (context. y=
'F01'
)
OR
(context.y=
'CIP'
)
OR
(context.y=
'T01'
)
OR
(context.y=
'U01'
)
OR
(context.y=
'L01'
))
--> AND context.y in ('F01','CIP','T01','U01','L01' )
second :
If you want multiple values you can separate your values by a delimiter in you context variable ex : "900;800;700;600"
then you use a tnormalize with ; as separator on this value,
then you iterate with a tflowtoiterate and you use the globalMap value of the field of the tflowtoiterate in your query.
Send me Love and Kudos
The query looks like:
"Select x,y,z from tablename where x=“+context.x+" and y in "+context.y
before executing the query, you can set the value of context variable on tJava/tJavaFlex component, eg:
...tJava--onComponentOK--tMysqlInput--main--...
on tJava:
context.x="900";
context.y="('T01','U01','D01')";
Regards
Shong