Lenght, Character_Length Function not working in view creation

Database
Vga
Enthusiast

Lenght, Character_Length Function not working in view creation

Hi All,

I am using TRIM(SUBSTRING (WHS.LOC_NM, LENGTH (WHS.LOC_NM)-2, 3)) funtion to get last 3 characters from a string. It's working fine. But while I am trying to create/replace a view with the above function, the execution give a syntax error "Somethig expected betwen LOC_NM and ',' "

I have tried with CHARACTER_LENGTH, CHARACTER, CHARACTERS functions but the did not work. Select statement works fine but create/replace view fails.

I am running this in SQLA with version 13.10

Help appreciated.

Thanks,

GV

1 REPLY
Junior Supporter

Re: Lenght, Character_Length Function not working in view creation

Hi.

You seem to be using the ODBC SQL extesions (scalar functions) instead of the teradata ones.

Disable them in SQL Assistant and use the proper ones (SUBSTR(string,from,numcharacters) instead of SUBSTRING(string,from,numcharacters) for example).

Or even better, use bteq ;-)

Cheers.

Carlos.