In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
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.

Create a custom SQL query by using the columns and filter conditions given in the excel

KustumB
5 - Atom

Hi Alteryx community, 

 

I have a requirement to create a custom SQL query based on the list of columns and filter conditions given by the user in the excel sheet. Please find the example below. I have to generate a SQL query using Alteryx as select age, name, gender from employee table where age>30 and name = 'kust' and gender = 'F'. 

column namesFilter conditions
Ageage > 30
Namename = 'kust'
Gendergender = 'F'

 

Highly appreciate any help. Thanks in advance. 

2 REPLIES 2
Felipe_Ribeir0
16 - Nebula

Hi @KustumB 

 

You can adapt the attached workflow to do it

 

Felipe_Ribeir0_0-1667387222908.png

1)Use the dynamic input tool with a query looking at the table and with the filter values to be replaced:

 

 

Felipe_Ribeir0_1-1667387272557.png

 

2)Configure the replacement of the filters in the dynamic input tool:

 

Felipe_Ribeir0_2-1667387323731.png

 

 

Felipe_Ribeir0
16 - Nebula

Hi @KustumB 

 

It worked? If yes, please accept it as a solution. Thanks!

Labels
Top Solution Authors