EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB485589: Encounter error of ('7B'X) is not a valid Teradata SQL token while executing freeform SQL


Haiping Jiang

Quality Engineer, Senior • MicroStrategy


This knowledge base article gives a solution to solve the “('7B'X) is not a valid Teradata SQL token” issue while executing freeform SQL.

SYMPTOM

Failed to execute freeform SQL if the query contains “{ts” and “}” characters.
For example, executing the following SQL in DB Query Tool:
select {ts'2020-05-05 05:46:21'}

ka04W000001IwE2QAK_0EM4W000005l4rs.png

CAUSE

NoScan='Yes' in registry or “Disable Parsing” checked in ODBC Data Source Administrator means the driver skips parsing the query string, queries are sent directly to the database, and “{ts” and “}” are not stripped first.
However, the “{ts” and “}” is not valid SQL token in the Teradata database.

ACTION

Uncheck “Disable Parsing” in ODBC Data Source Administrator or set NoScan='0' in the registry will solve the problem.

Uncheck “Disable Parsing” in ODBC Data Source Administrator

Use Teradata Database ODBC Driver 17.10 DSN as an example.
Go to ODBC Data Source Administrator (64-bit) -> System DSN -> <your DSN name> -> Configure -> Options

ka04W000001IwE2QAK_0EM4W000005l4rt.png

Set NoScan='0' in Registry

Go to Registry Editor -> Computer\HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\<your DSN name> -> Set NoScan='0'

ka04W000001IwE2QAK_0EM4W000005l4ru.png

Note

The "NoScan" value set in Registry takes precedence over the “Disable Parsing” value set in ODBC Data Source Administrator.
 


Comment

0 comments

Details

Knowledge Article

Published:

July 12, 2022

Last Updated:

August 11, 2022