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 |
|
ladiaocb
Yak Posting Veteran
57 Posts |
Posted - 2005-03-21 : 13:30:50
|
| Need Help,I have a table that looks like:ID DateRecevied DateClosed1 2003-02-04 00:00:00.000 2003-03-25 00:00:00.0002 2003-02-07 00:00:00.000 2003-02-19 00:00:00.0003 2003-02-10 00:00:00.000 2003-02-14 00:00:00.000I want to return all rows where it took 10 and more days to close from the time it was received. Thanks in advance!! |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-03-21 : 13:46:16
|
select ID, DateRecevied, DateClosedfrom MyTablewhere datediff(d, DateRecevied, DateClosed) >= 10Go with the flow & have fun! Else fight the flow |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-03-21 : 13:59:14
|
| For performance reasons:select ID, DateRecevied, DateClosedfrom MyTablewhere DateClosed >= DATEADD(d, 10, DateRecevied)Tara |
 |
|
|
ladiaocb
Yak Posting Veteran
57 Posts |
Posted - 2005-03-21 : 14:18:45
|
| Thanks much!!! |
 |
|
|
|
|
|