I have a column 'TEST_COLUMN' that carries 3 values:
123
123ad(44)
w-eq1dfd2
I need to SELECT TEST_COLUMN but get the following result:
123
12344
12
I am running on Db2 Warehouse on Cloud.
I have a column 'TEST_COLUMN' that carries 3 values:
123
123ad(44)
w-eq1dfd2
I need to SELECT TEST_COLUMN but get the following result:
123
12344
12
I am running on Db2 Warehouse on Cloud.
You can use REGEXP_REPLACE:
SELECT REGEXP_REPLACE(
'123Red345', '[A-Za-z]','',1)
FROM sysibm.sysdummy1
The query would return "123345".
Because you asked below, here is the generic version:
SELECT REGEXP_REPLACE(YOUR_COLUMN, '[A-Za-z]','',1)
FROM SCHEMA.TABLE