Oracle error 923 when selecting hardcoded values for some columns in UNION ALL
I am facing oracle error 00923 while trying to retrieve hard coded values ('') in one of the sub-query that is a part of UNION ALL query. select p.owner, p.exception_id, p.status, p.product_id, p.event_id from exception p, exception c where c.Parent_Id = p.Exception_Id AND c.Owner_COID = p.Owner_COID UNION ALL select p.owner, p.exception_id, p.status, '', '' from exception p and not exists (select * from bb_Exception c WHERE c.Parent_Id = p.Exception_Id); Could some one please help me resolve the issue?. Thanks
No WHERE clause in the second half of the UNION ALL ! from exception p and not exists (select * from b should be from exception p where not exists (select * from b Once you fix that, if p.product_id or p.event_id are numeric (as might be expected with IDs) then you should get this exception: ORA-01790: expression must have same datatype as corresponding expression The solution in to use null rather than empty string. Oracle treats them as equivalent but '' is a varchar2 datatype and null is not.
Oracle SQL to bring back results not in
Oracle: Determine Partition Size
How to determine the most efficient index range size to grab?
Use Cursor variable to insert with a loop in a store procedure
Using a Variable in a Table Creation Script
Accessor is not a parameter accessor
Oracle Apex Execution of Page Process
case when oracle BI
Insert Entry and Ignore Sequence
SSIS converts Varchar2 to DT_STR
oracle to_char daylight savings
Oracle: How to find in a tree
java timestamp with timezone to store in ORACLE DB
Schedule a job on specific dates using DBMS_JOB
Oracle : Stored procedure how to to_char expression in string variable
How to set up a database link in Oracle?