Alteryx Designer Desktop Discussions

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

SQL: WHERE NOT EXISTS, WHERE NOT EXISTS, LIKE '%'

4LTRIX
5 - Atom

 

Tags: SQL, WHERE NOT EXISTS, Compound Logic, LIKE, 

 

SELECT a.*, 'Label' AS field_alias 
FROM Table_A a 
WHERE NOT EXISTS (
	SELECT 1 
	FROM Table_B b 
	WHERE a.[Field_1] = b.[Field_1] AND a.[Field_2] = b.[Field_2]) 
AND EXISTS (
	SELECT [Field_2] 
	FROM Table_B) 
AND [Field_3] LIKE '%string_wildcard%'

 

 

 

 

Hello, I am interested in translating the above SQL logic into a Alteryx workflow. I am new to Alteryx, and would greatly appreciate any insight or guidance. 

 

What I've Learned

From other community discussions, I believe that using a Join Tool could be used to replicate WHERE NOT EXISTS  and EXISTS, but I am not sure how to use both in the same workflow.

 

Additionally, I am interested in using a wildcard functionality to return records where a certain field's value is LIKE a specified string.

 

The Data

Two tables with the same 5 field names from different periods.  

 

1 REPLY 1
Qiu
21 - Polaris
21 - Polaris

@4LTRIX 
Refer to below, it should contain all you need for SQL Joints and Alteryx Join.
And as for the wild card, you could use Contain Function or Reg_Match function.
https://community.alteryx.com/t5/Weekly-Challenge/Challenge-71-Recreate-SQL-Joins-in-Alteryx/td-p/61...

Labels
Top Solution Authors