how to pass variables this in dynamic query in sql

Posted by Ranjana on Stack Overflow See other posts from Stack Overflow or by Ranjana
Published on 2010-06-11T12:00:15Z Indexed on 2010/06/11 12:33 UTC
Read the original article Hit count: 287

Filed under:
|
|

i using the dynamic query to pass the variables

select a.TableName, COUNT(a.columnvalue) as '+'count'+' from Settings a where a.ColumnValue in ('+ @columnvalue +') and a.Value in (' + @value +')

the @columnvalues = 'a','b','c' @value ='comm(,)','con(:)'

how to pass this in dynamic query

any idea???

© Stack Overflow or respective owner

Related posts about sql

Related posts about query