title: Execute sql stored procedure by passing parameters as a query
body: <p>I tried many time to pass query as parameter to the execute a <code>stored procedure</code>. But it is giving compile time error everytime. Below is my <code>query</code></p>
  
  <pre><code>exec IAM_INSERT_ASSET (select top 1 ItemID from MIR_ItemMaster order by ItemID desc),1662
  </code></pre>
  
  <p>There are two parameters, out of which first is dynamic by the query and second is hard coded. <code>Obviously I can do this by keeping query in variable and passing variable.</code> But I do not want to declare variable and pass query directly to the procedure. How can this be achieved. Any help?</p>