title: SQL Query date as at today
body: <p>I have a large section of code </p>
  
  <p>That produces the below output example:</p>
  
  <p><a href="https://i.stack.imgur.com/gFlCn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gFlCn.png" alt="enter image description here"></a></p>
  
  <p>What I want to do is change the output so for <strong>Future scheduled value</strong> highlighted in the output it would only show the amount from the date the script is run.</p>
  
  <p>example  - all amounts would stay the same as they are overall total amounts adding up since the start of the job <strong>BUT</strong> the Future scheduled value would change depending on when you run the report.  <em>so if you ran it today it is 1000 but tomorrow could be 300 etc etc</em> </p>
  
  <p>I have selected the bits of code that reference this part as below:</p>
  
  <pre><code> DECLARE @futureplanned TABLE(
  Jobid INT,
  hours MONEY,
  sale MONEY)
  
  
  INSERT INTO @futureplanned
  (
      Jobid,
      hours,
      sale
  )
  
  Cast(ROUND(isnull(fp.sale,0),0) as INT) [Future scheduled value**],
  
  LEFT JOIN @futureplanned fp on fp.jobid=job.jobid
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>All help and advice much appreciated.</p>