title: Compile sqlcmd SQL template with variables
body: <p>I have a SQL file with variable in it. I want to get the <code>SQL</code> file where variable replaced by value I provide to <code>sqlcmd</code>. Can this be done?</p>
  
  <p>I have:</p>
  
  <pre><code>USE AdventureWorks2012;
  
  SELECT x.$(ColumnName)
  FROM Person.Person x
  WHERE x.BusinessEntityID &lt; 5;
  </code></pre>
  
  <p>I want:</p>
  
  <pre><code>USE AdventureWorks2012;
  
  SELECT x.Column1
  FROM Person.Person x
  WHERE x.BusinessEntityID &lt; 5;
  </code></pre>
  
  <p>I hope it works something like:</p>
  
  <pre><code>sqlcmd -i template.sql -o compiled.sql -v ColumnName=Column1 --template-only
  </code></pre>