Alteryx Designer Desktop Discussions

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

Where not EXIST SQL in Alteryx

herbert1682
6 - Meteoroid

I have two tables I want to filter out table A that does not exist in table B

 

 

 This is the SQL 

 

Select * FROM Denials
WHERE NOT EXISTS
(
SELECT * FROM Exlusion_List
WHERE Exlusion_List.Code = Denials.RsnCode
)

3 REPLIES 3
echuong1
Alteryx Alumni (Retired)

Are you trying to replicate this query in Alteryx or are you just trying to load the data in using that query? 

 

You can actually use your SQL select query in Designer in the input data tool. When you connect to the DB, use the SQL editor. 

 

If you are trying to replicate the query in Alteryx, you would import each of the tables separately, and then use a Join tool. Depending on which side you connect each input will determine where the data you're looking for will be. Essentially, the join tool will give you everything that is common in the J output, and the non-matching data will be in the L and R outputs.

 

Let me know if this helps!

RolandSchubert
16 - Nebula
16 - Nebula

Hi @herbert1682 ,

 

in Alteryx, you would use a Join tool to select rows of Table 1 with a specific field value not present in Table 2.

 

22-07-_2020_08-44-37.png

 

I've attached a sample workflow. Let me know if it works for you.

 

Best,

 

Roland

grazitti_sapna
17 - Castor

Hi @herbert1682,

 

There are multiple ways to do it. Two of them are:

1)  You can use your SQL select query in Designer in the input data tool. When you connect to the DB, use the SQL editor to get the specified results.

 

2) You can use a join tool and make use of L port to get the records which are present in the 1st input but not in second input.

 

 
 

join.png

 The green highlighted portion should be your path.

I hope it helps.

Sapna Gupta
Labels