Dynamically change date in SQL Query
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm creating a workflow that shows top 50 customer revenues by the past six months. How can i dynamically change the query to filter the dates between the current month and six months earlier? I want this flow to be completely automatic without me having to change the parameters of the months every time I run it. My dates are set up as yyyymm. I am using a teradata input.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Agreed with @alexnajm - either of the highlighted options below should work for you:
If one doesnt, try the other, I've experienced mixed results depending on the use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Agreed @gautiergodard!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As always I'm going with dynamic input in-db and editing the where clause in a formula tool.
not to say the other answers are wrong but personal preferences and if you are doing the query on server or on your own system...
