Ramazan Gunes
Ramazan Gunes

Reputation: 35

check the records that whether includes date format or not

I have a column contains strings like 13.04.2021 / CC 45,00 , CCC 54,43 3.05.2021 or null records. and I want to trim dates and I need only others. For example we take 13.04.2021 / CC 45,00 records. I need only CC 45,00 string.

Upvotes: 0

Views: 46

Answers (1)

Ankit Bajpai
Ankit Bajpai

Reputation: 13517

If you only want to remove the dates from your strings and they are only in the pattern of dd.mm.yyyy, You can try below pattern -

SELECT REGEXP_REPLACE(STR, '(\d{1,2}\.\d{1,2}\.\d{4})', '')
  FROM YOUR_TABLE;

Demo.

Upvotes: 1

Related Questions