I am trying to get a "where in" to work using a parameter in sql.
SELECT * FROM tablename WHERE(name IN (@names))
So I execute the SQL in sqlmanager, and enters 'Name1', 'Name2' in @name value, when i get asked for it. This way, query returns 0 rows. But if i change the SQL to:
SELECT * FROM tablename WHERE(name IN ('Name1','Name2'))
It works.
What is the trick to make it work?
This post solved it for me: Link to post Thanks for all the responses :)