REGEXP_SIMILAR Syntax

Database

REGEXP_SIMILAR Syntax

Hi,

I am trying to use REGEXP_SIMILAR function but it returns following error:

"3706: syntax error: Data Type "city" does not match a Defined Type name"

I am using following command:

Table Definition: create VOLATILE TABLE city_dim(city varchar(20)) on commit preserve rows;

SQL: SELECT city,REGEXP_SIMILAR(city, 'shr', 'i') from city_dim;

Seems like syntax has changed. DBCINFO shows following teradata release/version:

RELEASE 14.10.04.03

VERSION 14.10.04.03b

Anyone faced this issue? appreciate your help to provide solution.

Tags (1)
3 REPLIES
Junior Contributor

Re: REGEXP_SIMILAR Syntax

This should work as-is.

Check what's returned by 

select * from dbc.FunctionsV where FunctionName = 'REGEXP_SIMILAR'

Should be two functions in td_sysfnlib with 2 and 3 parameters...

Re: REGEXP_SIMILAR Syntax

It showing only one function in TD_SYSFNLIB with NumParameters as 3. 

In my example also using the syntax having three params. Not sure whats the issue.

Re: REGEXP_SIMILAR Syntax

I got some clue from other thread where drop stat not working in SQL Assistant 15.0, same problem is with REGEXP_SIMILAR function too. I am able to run this function in BTEQ.

Thanks Dieter for help in either threads.