All Forums Database
lecslecin 4 posts Joined 08/14
17 Mar 2015
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.

dnoeth 4628 posts Joined 11/04
17 Mar 2015

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...

Dieter

lecslecin 4 posts Joined 08/14
18 Mar 2015

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.

lecslecin 4 posts Joined 08/14
23 Mar 2015

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.

You must sign in to leave a comment.