Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Where clause help for between two "dynamic" dates.

Tybo
7 - Meteor

I've googled for days and no luck. Trying to Filter either with "Filter In-DB" or a "where clause". Both require sql code but I can't seem to find what works.

I want to filter my data by the first of the current month and the last day of the month 11 months from this month.

 

SELECT *

FROM abc.123_Resource

WHERE 

RESOURCE_DATE BETWEEN "first day of this month" and "last day of month 11 months from now" 

 

Essentially, a year's worth of data based on future dates starting from this month. 

I've attached a picture of my most recent attempt out of 200 from "google-ing".

Thanks!!!!

3 REPLIES 3
Tybo
7 - Meteor

Data type is DATE TIME

ArtApa
Alteryx
Alteryx

Hi @Tybo - In-db tools enable blending and analysis against large sets of data without moving the data out of a database, which can provide significant performance improvements over traditional analysis methods that require data to be moved to a separate environment for processing. You don't need to use SQL in your case. You can use a Filter In-db: https://help.alteryx.com/20213/designer/filter-db-tool 

Tybo
7 - Meteor

Unless I am mistaken, the In-DB filter doesn't work like a regular filter tool. You still have to write the filter code of the database's native language. Is this correct? I was able to use the regular filter but when I copied the filter code to the In-db filter it didn't work.

Labels