So the first step on our flow is something we manually update monthly
This Teradata SQL query:
select DB.TABLE.field1,
DB.TABLE.Year_month
from DB.TABLE
where DB.TABLE.Year_month = '2023-01'
How do I adjust this WHERE clause to always be the previous month?
Any help is greatly appreciated
Edit: As I'm still struggling with this, I have found that maybe I need something like this:
DateTimeFormat([DateTime_Out],"%Y-%m")
or
DateTimeAdd(DateTimeFirstOfMonth(), 1, "months")
But I can't exactly put together the syntax required