DBQuery - Expected ) found numeric-literal
I'm trying to put together a DB query which converts a number to a character so I can include any leading zeros. The debugger is throwing and error of "expected ")", found "<numeric-literal>" "
When I copy the query to our database tool, it work and returns the expected result. Can I not use the TO_CHAR function?
DBQuery {select TO_CHAR(EMPID, '099999999') EMPID, PERS from TEST.PERSON where LNAME = '$var_CheckLastName' and FNAME = '$var_CheckFirstName' and DOB = TO_DATE( '$varDate') ,$var_DBConnInfo ,true }
-
The format that you are using inside the local variable to generate the DB Query is causing the error, please use the "concat" function to generate the DB Query and use " &apos" to handle the single quote('). Please see the attached sample DB Query and also check the below forum post to explore more on this.
To use splitting along with aggregation functions0
Post is closed for comments.
Comments
1 comment