We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

JOINS with AND and OR conditionals

jdallen75
7 - Meteor

Hello,

 

I was able to convert this SQL query:

 

SELECT *
FROM TableA A
JOIN TableB B
ON (A.One = B.Alpha OR A.One = B.Beta)

...by unioning the inner join results of joins on A.One = B.Alpha with A.One = B.Beta

 

I now need to add one more logical conditioning statement in SQL:

 

SELECT *
FROM TableA A
JOIN TableB B
ON [(A.One = B.Alpha OR A.One = B.Beta)
AND (B.Gamma = A.Two OR B.Gamma = A.Three)]

 

But I'm having trouble determining the correct order of tools used in Alteryx.

 

Any suggestions?

Thanks.

1 REPLY 1
FinnCharlton
13 - Pulsar

Hi @jdallen75 , as you have completed the first condition of the join already, you now have the two datasets in joined in one table. You can use a filter tool to satisfy the second condition, with the formula B.Gamma = A.Two OR B.Gamma = A.Three. Hope this helps!

Labels
Top Solution Authors