Alteryx Designer Desktop Discussions

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

Querying multiple databases

JetCoder
6 - Meteoroid

I am new to Alteryx and am trying to figure out how to use it. I have an Access database that I use for processing data that runs on a timer and then stores the processed data in another back end Access database. I have a VB.net application that uses the data. Now on to my question. In my processing database I have a query that looks like this:

 

Select Table1.Cust, Table2.Addresses FROM Table1 LEFT OUTER JOIN Table2 ON (Table1.ID = Table2.RecID) Where Table1.Cust IN (Select * CustomerID From Table3 Where CustomerID Is Not Null))

 

Table1 and Table 2 are from the same datasource, however Table3 is from another database and the results from table 3 are used as criteria in the main query. Keep in mind the results from table3 will me multiple rows providing criteria for the main query.  

 

I tried to create an Input Data object with the Select * From CustomerID query then flowed it into a Dynamic input query setting the Update Where to replace the Select * CustomerID string with the field from my Input Data object with no success. 

 

Can anyone provide me with some guidance on how to structure something like this?

3 REPLIES 3
gc
9 - Comet

I am not sure If I understand correctly, but what if you left the SQL commands behind and just used the Join and Union tools? Input tools to get data from Table1, Table2, Table3. Then a Join between Table1 and Table3, then taking the Join output as input to another Join with Table2, followed by a Union of the Left and Join outputs? Something like that?

 

If that doesn't make sense to do, maybe you can upload your workflow for the community to inspect and offer other advice.

JetCoder
6 - Meteoroid

Thanks I will try that and let you know that may push me in the right direction.

JetCoder
6 - Meteoroid

What I ended up with is simply two inputs, a join and output. I was stuck on thinking that all of the inputs had to flow from one to the other. Sort of in a sequential way, I didn't even know you could create two inputs separately on the same workflow. Like I said, I am brand new to Alteryx, so this was a learning curve. Thanks gc your response caused me realize that i could create two inputs without associating them until the join. I know it sound crazy but am so used to doing all of this through code. 

Labels