cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameter to query used in transaction

Former Member
0 Kudos

Hello everyone,

I am working on one transaction which consists of two queries.The input for query is list of strings.So,I am using IN clause in query to give list of strings as input.How can I give parameter to query used in transaction?

Please help me with this.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

#1 build a stored procedure which does the queries

#2 run the stored procedure from MII with the strings concatenated and pipe delimited in [Param.1]

#3 you can "select" the output in the stored procedure and make it available back to the MII transaction.

If the stored procedure can't apply the IN clause because it's parametric, you have to rethink the queries so that it works.Usually IN statements have to be evaluated first. You need to rewrite your query to be more "like" than "in".

SELECT *
FROM Tags
WHERE '|one|two|three|four|'
  
LIKE '%|' + Name + '|%'