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
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 ;-)