Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Dynamic Input In-DB

nudraco
7 - Meteor

Hello Community!

 

Need your help in resolving the following challenge.

 

How to dynamically replace 'VARIABLE_1 and _2' in the this ORACLE SQL:

+++

Select *  
From IDVRX.V_RX_'VARIABLE_1'
Where MKT_GID = 'VARIABLE_2'
+++

Both 'Variable_1 and 2' are results of the their own relevant queries.

Thank you very, very, very much!

Steve.

 

  

  

5 REPLIES 5
Claje
14 - Magnetar

Hi,

Assuming you have your query in a String field in Alteryx already, and your results that identify Variable_1 and Variable2 in your stream, I would think you could use two formulas to do this:

REPLACE([Code],"'VARIABLE_1'",[Variable1Query])
REPLACE([Code],"'VARIABLE_2'",[Variable2Query])

Then you could pass this into the Dynamic Input In-DB tool and you'd be off to the races!

If that doesn't work, maybe you could provide a screenshot or two of your flow so far?

 

nudraco
7 - Meteor

Claje,

Thank you very much for your suggestion!

 

I just found another solution to my problem and very happy about it.

1. Created Variable_1.csv file with variable value as a result of one SQL query.

2. Used Variable_1.csv as an input to build a 'final' SQL query by using Formula tool and created an output file with CONNECTION, SQL Query - OUTPUT_1.csv

3. Used OUTPUT_1.csv file for Dynamic In-DB tool to execute the query.  

Please let me know how do you like it!

Regards,

Steve. 

 

Claje
14 - Magnetar

That sounds like a great solution!

nudraco
7 - Meteor

Thanks!

neerajupadhyay
5 - Atom

Hi,

 

Can you please elaborate more on this. As i need to pass an Parameter to SQL query using Connect IN-DB tool  

Labels