Dynamic Input In-DB
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
- In Database
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That sounds like a great solution!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Can you please elaborate more on this. As i need to pass an Parameter to SQL query using Connect IN-DB tool
