Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DATE SELECT

Author  Topic 

seed
Starting Member

3 Posts

Posted - 2015-02-28 : 09:31:11
HI ALL,I would like to write a sql query which allows me to select all drivers who's contract expires before 25/02/2016 from table:DRIVER
thank u

NAME CONTRACT_START CONTRACT END
A 1/1/2012 21/02/2016

B 2/2/2014 2/03/2017

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2015-02-28 : 15:01:58
SELECT Name, Contract_Start, Contract_End FROM dbo.Driver WHERE Contract_End < '20160225';


Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page
   

- Advertisement -