I've query to intersect three queries based on three parameters being given.
So Ive done it using simple intersect as something like this
Select name, email from table1 where param='p1'
intersect
Select name, email from table1 where param='p2'
intersect
Select name, email from table1 where param='p3'
But the problem is sometimes few of the parameters having no data or blank. in that case the query results nothing because of intersect with blank data. So how can I handle this situation, so that if no data for one parameter (Among any of the 3), that query should not be considered in the whole
intersectwouldn't give you a result, unless all the 3 parameters are missing and you use the same default values for all of them.