Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
JCKiran

Senior Member
Registered:
Posts: 58
Reply with quote  #1 
Hi,

We  are trying to pass a properly quoted string to a Query BO as shown below:

WHERE efolderid IN (@param)

and the param is prepared in script like this: 
@param = "'xxxxxxx','xxxxxxx','xxxxxxx'"

However, this is not working. I tried all the possible ways to achieve this. But no luck. Can any one suggest how to do this

__________________
Kiran
0
praxkan

Veteran
Registered:
Posts: 142
Reply with quote  #2 
This is a common issue - not really a metastorm issue though.

Parameters in queries dont support the IN clause. 

If you google this you'll find several clever/complex workarounds. 

One method we've tried before is to use a comma separated list to table function. That way you can build your list like you have and pass it into the query as a parameter. In the query you'd have something like

select * from querytable where column in (comma_to_table(@yourParam))

PS - look for "pudf_stringlist_to_table" function. This does what i'm referring to above. I believe it ships with metastorm
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!