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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-08-10 : 07:41:37
|
| Paul writes "SELECT INVAUDIT_NF.INV_CLASS_CODE, INVAUDIT_NF.INV_CLASS_DESC, INVAUDIT_NF.TRANS_DATE, INVAUDIT_NF.CHANGE_QTY, INVAUDIT_NF.TRANSACTION_CODE, INVAUDIT_NF.TRANS_DESCFROM INVAUDIT_NF INVAUDIT_NFWHERE (INVAUDIT_NF.TRANS_DATE>={d '2005-03-01'})How can I with the above code in MS Query bring up results for the past 3 months from today without having to hard code a date in (as shown above) 3 month before today?Best Regards Paul" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-10 : 07:50:04
|
| WHERE DateDiff(m,INVAUDIT_NF.TRANS_DATE,Getdate())=3MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|