Oracle Error Message
PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression
Reason for the Error
The SELECT clauses to the left and right of a UNION, INTERSECT, or MINUS expression do not select the same number of columns. For example, the following statement is faulty because the select lists do not contain the same number of items: CURSOR my_cur IS SELECT ename FROM emp INTERSECT SELECT ename, empno FROM emp;
Solution
Change the select lists so that they contain the same number of items.