B
B. Chernick
I'm writing a Winforms Dot Net 2.0 program that has an XSD. I need to call
a query with a list of key values so I created a query:
SELECT * FROM Table1 WHERE (key1 IN (@parm1))
where key1 is a char field and the only key field.
Now if I run this in the SQL Query analyzer like this, with literals:
SELECT * FROM Table1 Where (key1 In ('Value1', 'Value2'))
it runs fine and returns what I expect. (2 rows)
If I call it from my program or run it in VS Query builder, it returns
nothing.
Is it even possible to use a parameter in this fashion?
a query with a list of key values so I created a query:
SELECT * FROM Table1 WHERE (key1 IN (@parm1))
where key1 is a char field and the only key field.
Now if I run this in the SQL Query analyzer like this, with literals:
SELECT * FROM Table1 Where (key1 In ('Value1', 'Value2'))
it runs fine and returns what I expect. (2 rows)
If I call it from my program or run it in VS Query builder, it returns
nothing.
Is it even possible to use a parameter in this fashion?