|
Archives of the TeradataForumMessage Posted: Thu, 27 Mar 2008 @ 16:06:55 GMT
Depends on the grain of your data. Is it captured at a daily level or aggregated to a monthly level with one record per month? ADD_MONTHS(CURRENT_DATE, -6) will yield 2007-09-27. You will have to write your query carefully if you want to include all data that is included in the month of September. You may want to consider extracting the month from the date returned and then leveraging the system calendar table to get all days in that month. A lot will depend on what the exact question is you are trying to answer and what data needs to be included to make sure you query is considering the correct range of time. Hope this helps.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||