Alteryx Designer Desktop Discussions

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

Use Output from one input as parameter in SQL query

Jafar
7 - Meteor

I am trying to create a workflow where the output from one SQL query from SQL Server can use as a parameter in other input SQL queries of  IBM DB2.
I am able to achieve this using an interface tool. Interface tool creates a dependency of the user which can be executed until the user selects from the drop-down. Can we create the same logic without the interface tool?

Activity Performed - 1. SQL Server connected in Drop Down and Output from the query is used as a parameter in InPut Tool.
Requirement - Need to create logic without manual input in the drop-down. Workflow should be executed directly.

 

4 REPLIES 4
Felipe_Ribeir0
16 - Nebula

Hi @Jafar 

 

You can use the batch input macro to do it. You will have your first db connection, filter/select the parameter and then pass the parameter to the macro, so it can update your second database connection.

 

 

MAIN WORKFLOW:

Felipe_Ribeir0_0-1674127561726.png

BATCH INPUT MACRO:

Felipe_Ribeir0_1-1674127572223.png

 

 

 

DataNath
17 - Castor

@Jafar could you not just replace the '20230104' in

 

where RG36.G36DTE > '20230104'

 

With a sub-query that runs the initial SQL query/select statement?

Jafar
7 - Meteor

Both SQL Query are on different platforms. Subquery works on same platform database

DataNath
17 - Castor

Ah had overlooked that sorry! Then a batch macro as mentioned above should do it.

Labels