All Forums Aster
sajmal 2 posts Joined 04/16
17 May 2016
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

 

 
 
 
 
 

ielbert 1 post Joined 05/16
23 May 2016

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

You must sign in to leave a comment.