Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Trying to parse multi select list to in statement
JagannathaSuta
<p>I have tried looking through this form to find the answer, todate I have not had any luck finding anything that suits my needs, or I have not adequatly described my situation in the search option, apologies for that.</p>
<p> </p>
<p>I am trying to get multiple items into my IN cluase in the where statement, I am using Eclipse Version: 3.7.1.</p>
<p> </p>
<p>This is in the script -> open section.</p>
<p> </p>
<p>var where = "";<br>
if (params["CREWID"].value)<br>
where = " W.CREWID IN ('" + params["CREWID"].value + "')";</p>
<p> </p>
<p>The values I am getting from Maximo look like this =CREW1,=CREW2, I would really like to be able to format the output to be ('CREW1','CREW2'). If I manually change the list output in Maximo to be CREW1','CREW2 it works. I omit the first and last single quotes as they are already included in the where = " W.CREWID IN ('" + params["CREWID"].value + "')"; statement.</p>
<p> </p>
<p>Thanks in advance</p>
<p>Jag</p>
Find more posts tagged with
Comments
Matthew L.
<p>Jag,</p>
<p> </p>
<p>Try the example from the following post:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/36152-filters-not-adequate-for-large-data-what-then/?p=133966'>http://developer.actuate.com/community/forum/index.php?/topic/36152-filters-not-adequate-for-large-data-what-then/?p=133966</a></p>
;
<p> </p>
<p>It includes examples for converting both Integer based multi-value parameters as well as String based multi-value parameters into an SQL IN clause.</p>