Hello Alteryx Team,
How can we set operations of SQL in Alteryx .
Set operations like as
Solved! Go to Solution.
Hi @rohit782192 ,
I try to "translate" the PL/SQL to Altery - in fact, to "rebuild" special SQL statements there are often different ways. I've decided for the "most SQL-like" version.
There is a UNION tool in Alteryx, but it's more like a UNION ALL in PL/SQL as it simply appends results from SELECT B to the results of SELECT A.
To get the results a UNION in PL/SQL would return, in Alteryx you would use a UNION tool first and remove the duplicates by a UNIQUE tool
The "U" output anchor returns the respective records.
INTERSECT works very similar - in fact it's the other output anchor:
To achieve the MINUS results, you have to add one more tool. You want the records from SELECT A, that are not in SELECT B - that means, removing the duplicates identified by the UNIQUE tool will do the job. For that, we can use a JOIN tool in Alteryx:
Hope this is helpful.
Best,
Roland
Superb.
It is really Help ful.
Hi, This was indeed useful!
one question on Minus Set operation - If we union at the very beginning then how we will ensure it is A - B?
It can also result in B - A. Correct me if I am wrong.
If you have sample workflow, could you please attach it.