Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.

Join using OR

sxyedur
5 - Atom

Hello,

 

I was wondering if there is a way to join two tables in a workflow together but have an OR statement of some sort?

 

My current SQL code follows this logic:

 

Table1 

Left Join Table2

ON Table1.Field1 = Table2.Field1

left join Table3

ON Table1.Field2 = Table3.Field1 OR Table2.Field2 = Table3.Field2

 

Thank you!

 

2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

Hi @sxyedur 

 

There's not a native way to do to this. What you'd probably need to do is something like this:

  • 1 join tool on table 1 and table 2
  • Join resulting J output to table 3 based on field 1
  • Join any fall outs on field 2
  • Union the results
caltang
17 - Castor
17 - Castor

If you can provide some sample data, we can show you better via Alteryx @sxyedur 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors