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.
| Author |
Topic |
|
thecarcrashhh
Starting Member
1 Post |
Posted - 2008-12-09 : 13:52:41
|
| I am working on a query to find: a list of all course sections scheduled to start in the future (from tomorrow on). I have course sections and dates which they start but i am not sure as to how i select only those starting from "tomorrow" onward. Any ideas are appreciated. |
|
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2008-12-09 : 13:59:21
|
| [code]where startdate > getdate()[/code] |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2008-12-09 : 17:27:22
|
| SELECT *FROM MyTableWHERE MyDate >= DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP), 1) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-10 : 02:21:48
|
quote: Originally posted by hanbingl
where startdate > getdate()
will take timepart also in comparison which will cause ones with todays date but at earlier time to be excluded |
 |
|
|
|
|
|