Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA:00905: Missing keyword error in the case

User_Z0PKCOct 22 2022

Hello All,
I am getting an error when I try to compile a procedure with the SQL Below

[Error] Compilation (20: 81): PL/SQL: ORA-00905: missing keyword

SELECT origin_id,
origin_name,
origin_desc,
ORIGIN_DATETIME_EPOCH,
MANUAL_OR_AUTO
FROM test_tbl
WHERE (CASE WHEN (p_l_origin_datetime_epoch is null) then ORIGIN_DATETIME_EPOCH > p_u_origin_datetime_epoch
when (p_l_origin_datetime_epoch is not null) then (ORIGIN_DATETIME_EPOCH > p_u_origin_datetime_epoch and ORIGIN_DATETIME_EPOCH < p_l_origin_datetime_epoch)
end)
;
p_l_origin_datetime_epoch and p_u_origin_datetime_epoch are the input params.
Not sure what the issue is in my SQL above.
Could someone please help and suggest?
Thank you so much!! Appreciate your time

Comments
Post Details
Added on Oct 22 2022
4 comments
1,433 views