I m running below query in toad to test the result but I am getting error as
ORA-00933: SQL command not properly ended
here is m
Your two larger SELECTS (the first 2) are returning 12 items. The last two SELECTS (the small ones) are returning 13 items. UNION must have matching columns.
eg statement should end...
SELECT NULL, 0, 'ABC', NULL, NULL, NULL,
'ABC', NULL, NULL, NULL, NULL, NULL
FROM DUAL
UNION
SELECT NULL, 0, 'XYZ', NULL, NULL, NULL,
'XYZ', NULL, NULL, NULL, NULL, NULL
FROM DUAL