meaning of " ('0A'X) is not a valid Teradata SQL token. "

Analytics
Enthusiast

meaning of " ('0A'X) is not a valid Teradata SQL token. "

In writing a stored procedure I received the above error message. I can't find a single reference to either "valid token" or "'OA'X" in any of the V2R6.1.x documentation on NCR.com.

Does anyone have any ideas as to what this might mean?

Nolan
6 REPLIES
Fan

Re: meaning of " ('0A'X) is not a valid Teradata SQL token. "

A guess would be that it is seeing a line feed and not expecting it. Is this a case where the file has been tranferred?

Re: meaning of " ('0A'X) is not a valid Teradata SQL token. "

Probably you might be missing Semi colon( ;-) at the end of line.
Enthusiast

Re: meaning of " ('0A'X) is not a valid Teradata SQL token. "

Hi,
The 'OA' hex equivalent is a line feed. So in your procedure somehwre there is a line feed character. Please remove this and you should be fine. Best way is to use trim on all the respective fields but the approach would vary as per case. Please check your query for line feed character being issued in the SELECT part of the query.
Enthusiast

Re: meaning of " ('0A'X) is not a valid Teradata SQL token. "

I had the same message writing a SQL script with a text editor under Windows, in DOS format (CR/LF at each line end, (0Dx0Ax)), and transfered to a MVS host (which uses simple CR line end (0Dx)) to execute.
Convert your script to Unix format to suppress these 0Ax before transfer to host...

Re: meaning of " ('0A'X) is not a valid Teradata SQL token. "

I had the same error using TPT via SSIS (Attunity) querying Teradata. I just removed all whitespace from my query and it ran fine.

Visitor

Re: meaning of " ('0A'X) is not a valid Teradata SQL token. "

Using TRIM(column_name) helped! Though, I'm not certain on root cause. I am typing my column name and do not have any spaces that I can see to even trim; however, TD Studio seems to be adding something to my column name which must be trimmed out. Possibly a TD bug? 

Tags (1)