title: Get parameter from EXECUTE statement in SQL Server?
body: <p>I want to create procedures with dynamic query like this </p>
  
  <pre><code>set @x = @query + CAST(@year AS varchar(10)) + ' and ' + @attribute + @operator +''''+ @value+''''
  execute (@x) 
  </code></pre>
  
  <p>Now I want to get value from execute statement but</p>
  
  <pre><code>select * from execute(@x)
  </code></pre>
  
  <p>does not work! Please help me </p>