Custom Month-to-date Expression [message #88384] |
Fri, 26 July 2002 13:05 |
Sam
Messages: 255 Registered: April 2000
|
Senior Member |
|
|
Folks/Gurus,
I would like to develop a custom month-to-date SQL with the following logic:
1- If its regular day of the month, I need a month-to-date (1st of the month to yesterday's) data, eg if its july 26th, data should be from july 1-july 25th.
2- if its 1st of the month, I need last month's month-to-date data. if its july 1, data should be from june 1-june 30th.
If this possible in one statement?
Thanks for your time and help in advance,
Sam
|
|
|
|