I need a set of values, only when they are available in two different select statements, so I used "intersect"
(select statement 1) intersect (select statement 2)
but I want all the values from one of the select statements when the other select statement returns with no value.
Example 1:
Statement 1 returns(1,2,3,4,5) and Statement 2 returns(2,5,8,9);
Expected result 1: (2,5)
Example 2:
Statement 1 returns(NULL) and Statement 2 returns(2,5,8,9);
Expected result 1: (2,5,8,9)
---Edit: Adding 3rd example for clarity---
Example 3:
Statement 1 returns(2,5,8,9) and Statement 2 returns(NULL);
Expected result 1: (2,5,8,9)
---Edit 2--- I am using this select in a