Hi,
I would like to pass value like '7002', '6997' into sql statement using in statement like following:
select * from users where id in (@Ids)
the @Ids value looks like '7002', '6997'
Please help!
Thanks
Alan
Pass value into sql in statement
-
- Posts: 6
- Joined: Wed Dec 21, 2011 3:44 pm
- Location: US
Pass value into sql in statement
Hello, Alan.
Where var1 = "'7002', '6997'"
Thank you.
We don't support list parameters in SQL query but you could use a variable of type string.wangxianlg wrote:I would like to pass value like '7002', '6997' into sql statement using in statement like following:
select * from users where id in (@Ids)
the @Ids value looks like '7002', '6997'
Code: Select all
select ... from ... where id in ({var1})
Thank you.