Check for valid date/time-stamp
There is so such built-in function , but you can user regexp to validate the value. Below the code. It will return true if it is valid time-stamp else false.
There is so such built-in function , but you can user regexp to validate the value. Below the code. It will return true if it is valid time-stamp else false.
Select SQLEXT.regexp_like(current_timestamp ,'\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$')
CASE WHEN REGEXP_LIKE(COl1,'[0-9]' ) THEN 'NUMBER ONLY' ELSE COl1 END as COl1
CASE WHEN REGEXP_LIKE(COl1,'[0-9]' ) THEN 'NUMBER ONLY' ELSE COl1 END as COl1