REGEXP_SUBSTR Function in Aster

Aster
Fan

REGEXP_SUBSTR Function in Aster

Hi, 

I am using following REGEXP_SUBSTR in Teradata 14 and result is fine. 

SELECT REGEXP_SUBSTR(SUBSTR('This is sample text day_of_month is 17--this value should be returned',POSITION( 'day_of_month' IN 'This is sample text day_of_month is 17--this value should be returned'),50),  '[[:digit:]]+', 1 ) AS Day_Of_Month


Result: 17

But when I am trying to execute the same in Aster. It gives the error that regexp_substr is not supported. Can anybody help me to know what is the equivalent way to achieve the purpose in Aster. 

Regards,

Saj

1 REPLY

Re: REGEXP_SUBSTR Function in Aster

How about this: SELECT SUBSTRING('This is sample text day_of_month is 17--this value should be returned' FROM 'day_of_month is ([[:digit:]]+)' )

Result: 17

Igor