title: Script Activity in Data Factory
body: <p>I have a Script Activity with the following sql script in my data pipeline as follows:</p>
  <pre><code>@concat('ALTER TABLE tbl',replace(pipeline().RunId,'-',''),' ADD Depth int; WITH emp AS ( SELECT *, 1 AS d FROM tbl',replace(pipeline().RunId,'-',''),' WHERE Email = ','EMAIL',' UNION ALL SELECT e.*, emp.d + 1 FROM tbl',replace(pipeline().RunId,'-',''),' e INNER JOIN emp ON e.ReportsToPersonnelNbr = emp.PersonnelNumber), ForUpd as (SELECT PersonnelNumber, d FROM emp) UPDATE tbl',replace(pipeline().RunId,'-',''),' SET Depth = B.d FROM tbl',replace(pipeline().RunId,'-',''),' A JOIN ForUpd B ON A.PersonnelNumber = B.PersonnelNumber')
  </code></pre>
  <p>I see this error on running pipeline:</p>
  <blockquote>
  <p>Operation on target Add Depth Column failed: Invalid column name 'EMAIL'.</p>
  </blockquote>
  <p>What am I missing?</p>