Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Varchar Date, NULL and Special Values

Orcl ApexFeb 6 2024

Hi All,

I have data coming in the file as below and my requirement is to return ‘31-DEC-9999’ when the date_to_update is NULL or some weird character.

WITH t AS (
SELECT '2024-01-01' date_to_update
FROM dual UNION
SELECT NULL
FROM dual UNION
SELECT '*'
FROM dual UNION
SELECT '@'
FROM dual
) SELECT *
FROM t;

Desired output -

  2024-01-01

   9999-12-31  
  9999-12-31  
  9999-12-31
Comments
Post Details
Added on Feb 6 2024
3 comments
73 views