Can anyone give me some insight into what im doing wrong here :
I am simply trying to use the Right function to get the most righthand 4 digits/characters from a query.
When I run it gives an 'expected a something and a something between ( and something' error which is not actually pointing to that line. As soon as I substitute the 'Right' keyword for 'Left' just to test the query it works perfectly - so I know that my query is correctly structured. The wierd thing is that it doesnt even work on a small standalone query like Select Right('TestString',5) from...
Since the Left command works im just assuming that the Right command should be the same syntax. Ive searched around and it seems to be viable.
Am I doing something wrong liko ommiting a comma etc?
RIGHT and LEFT are keywords for joing tables not for substrings. You may have a UDF installed on your system that also defines string functions. As far as I know there is not a Teradata defined function that will pull the right-most characters of a string.