Jump to content

Parameter in a "in" statement


mathiasen_jakob

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

If you are not using a collection or list, like Giulio suggested, then the syntax would be:

 

select col1,col2 from table1 where col1 IN ( $P!(parameter1) )

Notice the spaces, notice the "!"

The "!" mark, tells that the value should be passed raw into the sql query

That only works with strings, because you cannot pass a list of integers, properly formatted for the query.

So unless you are manually introducing the parameters as:

1,2,56,78,99

you will have to use a collection, which takes me to the answer Giulio already provided.

Hope that helps

 

Alexandru Ersenie

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...