I have below query whereby i want to select all records at a specific hour but the other hours i want to filter to whitelisted records
SELECT
*
FROM
MY_TABLE
WHERE
COLUMN_A IN
(CASE
WHEN TO_CHAR(COL_TIMESTAMP, 'YYYYMMDDHH24') != '2021111217' THEN (
SELECT DISTINCT COLUMN_A
FROM
ANOTHER_TABLE )
ELSE COLUMN_A
END);
However with the query i get error
SQL Error [1427] [21000]: ORA-01427: single-row subquery returns more than one row
How do i write this query without using union