Error: Syntax Error
A syntax error occurs when trying to use a question mark or an asterisk as a character in a string field in the Field Calculator, SQL connections, and Query Builder.
The Field Calculator, SQL connections, and Query Builder interpret these characters as wild cards, not as string characters.
Solution or Workaround
- Use the request .AsChar to concatenate the wild card character into the string using the appropriate ASCII code number. The ASCII value for a question mark is 63, and a for an asterisk is 42. The following expression returns the value string*string:
"string" + 42.AsChar + "string"
- Use the .Quote and .Unquote requests to populate a field. This makes the whole string readable. For example, the following expression in the Field Calculator:
returns this value: