SQL: WHERE NOT EXISTS, WHERE NOT EXISTS, LIKE '%'
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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...
