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

KB32981: "Execute Query Failed ... String not terminated before end of text" or "Unclosed quotation mark" error message appears when browsing elements after setting a Query Band pre/post-statement


Stefan Zepeda

Salesforce Solutions Architect • Strategy


SYMPTOM:
 User receives a database error, such as "String not terminated before end of text" for Teradata, when browsing elements.  This occurs after inserting a SET QUERY BAND pre/post-statement for element browsing in VLDB properties at the project or report level.   This does not occur for the Report pre/post-statements. 
 

ka02R000000kbC3QAI_0EM440000002E6M.jpeg

 
The setting altered which created the issue is shown below:
 

ka02R000000kbC3QAI_0EM440000002E6L.jpeg

 
Sample SET_QUERY_BAND statement which causes the problem:
SET QUERY_BAND = 'MSTR_JobID=!j;MSTR_SessID=!s;MSTR_ProjID=!z;MSTR_Proj=!p;MSTR_RepID=!r;MSTR_Rep=ELEMENTBROWSING;MSTR_Usr=!U;' FOR SESSION;
 
  
CAUSE:
The Strategy 9.x and 10.x SQL Engine interprets a single semicolon as end of the statement.
 
ACTION:
This issue is resolved with proper syntax usage. To use a semicolon inside a statement instead of it being treated as end of statement, all semicolons have to be doubled. This way the Strategy 9.x / 10.x SQL Engine knows it is not the end of the statement and parses it as single semicolon.
 
Sample SET_QUERY_BAND statement which resolves the problem:
SET QUERY_BAND = 'MSTR_JobID=!j;;MSTR_SessID=!s;;MSTR_ProjID=!z;;MSTR_Proj=!p;;MSTR_RepID=!r;;MSTR_Rep=ELEMENTBROWSING;;MSTR_Usr=!U;;' FOR SESSION;
 


Comment

0 comments

Details

Knowledge Article

Published:

June 1, 2017

Last Updated:

December 19, 2017