how to pass variables this in dynamic query

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:02 UTC
Read the original article Hit count: 242

Filed under:
|
|

i using the dynamic query to pass the variables

select a.TableName, COUNT(a.columnvalue) as '+'count'+' from Settings.ColumnMapping 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