Sunday, 15 February 2015

sql server - Return all records within given date -


question

How do I return all records to a certain number till date?

Examples in pseudo code

  Choose every record from the table where plandate = today and next 14 days  

have I tried?

  Select from the Joblist * Planet & gt; = GETDATE () +14  

You can use it:

  Where Planet & gt; = CAST (GETDATE (as of DATE) and plate & lt; DATEADD (day, + 15, CAST (GETDATE () AS DATE))  

Note that you only have to use SQL Server 2008 if you have at least.


No comments:

Post a Comment