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 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2012-06-20 : 11:43:25
|
| -- WHERE OGEN.DATEONLY(END_DATE)- OGEN.DATEONLY(START_DATE) < '1900/03/01'can you explain this statment to me? If I take it out, I get records, of its in, nada. |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-06-20 : 12:05:03
|
| It doesn't make any sense in Microsoft SQL Server. The difference between dates is measured in days, months, years, etc. My guess is that they are trying to say "Did this take less than 3 months?" Which in t-SQL would be something likeWHERE END_DATE <= DATEADD(month,3,Start_Date)JimEveryday I learn something that somebody else already knew |
 |
|
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2012-06-20 : 12:14:02
|
| Thanks Jim.maybe they converted from this: WHERE TRUNC(END_DATE) - TRUNC(START_DATE) < 60this is how it is in the Oracle version of the sp. |
 |
|
|
|
|
|