I have this statement:
Declare @sql varchar(max) = \'\' declare @tablename as varchar(255) = \'test\' select @sql = @sql + \'select [\' + c.name + \'],count(