ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
RESUELTAS

Querying a 6 month Date Range

Soxfaninfl
Asteroide

Hi Everyone,

 

I'm trying to query data in table for a specific date range, and I want to pull data going back as far as 6 months from the current day. I don't want to use the filter tool because this table has over 77 million records. Does anyone have a expression available I could use in a input tool for the column that I'm trying to query on? No I can't use in database tools for this workflow.

 

Thanks,

 

mackedet

5 RESPUESTAS 5
Claje
Magnetar

A solution for this would depend on what type of database you are using.  Can you provide that information?

Roughly, most database languages (SQL, MySQL, etc) can support this kind of dynamic range, so you would want to write this pull with that filter.

Soxfaninfl
Asteroide

The table is a SQL table, so your saying I would use WHERE [columnname] > DATEADD(mm, -6, GETDATE())? This does work in sql server.

ZacharyM
Alteryx Alumni (Retired)

Yes, tag a standard SQL syntax based WHERE statement to the end of your query in the Query Editor and this will accomplish what you want.

 

WHERE [columnname] > DATEADD(month, -6, GETDATE())

Claje
Magnetar

++ @ZacharyM's post - that's exactly how I'd recommend solving for this issue.

Soxfaninfl
Asteroide

Thanks everyone for the help!

Etiquetas
Autores con mayor cantidad de soluciones