ORA-01789: query block has incorrect number of result columns
The ORA-01789: query block has incorrect number of result columns error message is thrown if multiple select statements are combined with union or union all and the number of selected columns is not equal for all select statements:
select 'one' txt, 42 num from dual union all
select 'two' txt, 99 num, sysdate dt from dual;