title: sql server DATEADD with sql inside DATEADD
body: <p>I need to do the following:</p>
  
  <pre><code>    Select ProID from Pros ps where ps.ProId = '102-C01-1299'
      and  ConfirmDate &gt; DATEADD(DAY, (select tt.DaysDue from tblTaskTimeline tt where Task   = 'TaskInfo') as days,ps.ProgStartDate) 
  </code></pre>
  
  <p>Note how for the DATEADD function, I need to dynamically get the 2nd parameter.
  Note that tt.DaysDue returns an integer value.</p>
  
  <p>I get a message saying that DATEADD requires 3 parameters.</p>