title: how do i get my customer records to still appear in the table beyond the 5 days advance period
body: <p>I have a query that pull out all customers records I will need to call within the next 5 days in the where clause as:</p>
  
  <pre><code>Remind to call =&lt; DATEADD(DD,5,GETDATE() and
  Remind to call &gt;= GETDATE()
  </code></pre>
  
  <p>The way i want it to work is that i want all customers records that i need to call 5 days in advance from GETDATE(). Once it has entered the table, it needs to stay in the table until users enters a date for the 'Confirmstart' field  on web application.</p>
  
  <p>What happens is my query displays the data as it should except it removes the customers record after the 5 days where i want the records to remain until the user has entered a date  for the 'ConfirmStart' field</p>
  
  <p>For example - Lets say todays date is 03/08/2016 where I want to pull out the customers i need to call within the next 5 days, therefore in my where clause i wrote:</p>
  
  <pre><code>&lt;Remind to call =&lt; DATEADD(DD,5,GETDATE() and
  &lt;Remind to call &gt;= GETDATE()
  </code></pre>
  
  <p>The Dateadd should pull out records up to 08/08/2016. t also say record iD called 'CR1' that has a RemindToCall date 08/08/2013 meet this criteria.</p>
  
  <p>The 'CR1' record appears in the table which is great. However when GETDATE() reaches the 9/08/2016, the 'CR1' record disappears from the table when i want it to still remain in that table  until the 'ConfirmedStart' date is entered.</p>
  
  <p>How do i get my customer records to still appear in the table beyond the 5 days advance period even though i need the records to appear 5 days in advance?</p>
  
  <p><strong>Further Information:</strong>
  To elaborate on my above example - here is the SQL code that for the 'CR1' record but instead of it being named 'CR1' in this live example its CoS ID record called'1232' - everything else remains the same:</p>
  
  <blockquote>
    <p>SELECT 
      CoSID,
      SurName,
      FirstName,
      EmailAddress,
      CONVERT (varchar,UKAddressDeadline,103) as UKAddressDeadline,
      CONVERT (varchar,PlacementStart,103) as PlacementStart, 
      CONVERT (varchar,PlacementEnd,103) as PlacementEnd,
      CONVERT (varchar,RemindToCall,103) as RemindToCall,
      ExtReference,
      HostOrgName,
      UKEndorsement,
      PaymentUKBA</p>
    
    <p>FROM
      dbo.tbl_CoS</p>
    
    <p>WHERE</p>
    
    <p>RemindToCall between CAST('2016-08-03' AS DATE) and DateAdd(DD,+5, CAST('2016-08-03' AS DATE))  AND</p>
    
    <p>(CoSNotRequired is null and
      AppWithdrawn = 0 and
      CoSWithdrawn = 0 and
      VisaRejected = 0 and
      UKAddressDeadline is not null AND
      ConfirmedStart is NULL OR
      UKEndorsement is NULL)</p>
  </blockquote>
  
  <p><a href="http://i.stack.imgur.com/k8pMJ.jpg" rel="nofollow">SQL RESULT of above</a></p>
  
  <p>I hope this extra information/details help you.</p>
  
  <p>Thanks people :D</p>