I'm running into a problem with an SQL Select-statement using column names that are including brackets, because the end brackets of the column names end up next to backslashes (due to using quotation marks within quotation marks: " \!" column name [ units ] \!" " ) and this interferes with the surrounding special escape characters (bracket and backslash: \[ ]\ ).
The SQL-statement is written between two brackets and slashes ( \[ Select ... ]\ ) and I'm using Eval(Parse(Eval Insert())) around the whole statement to evaluate a variable (filtering by a start date).
The command is structured like this:
Eval(Parse(Eval Insert(
"dt = Open Database( settings,
\[Select \!"table1\!".\!"column_name[units]\!" ... ]\
);"
)));
As you see, the end bracket after column_name[units] ends up next to a backslash for the quotation mark around the column name, effectively making up an unwanted special escape character ( ]\ ).
- I've tried using single quotation marks around the column names, and the command executed but no data was retrieved. When searching for discussion or documentation on single quotation marks I wasn't able to find any.
- I've tried using the eval insert replacement string for a quation mark ( both " and \!" ) but it wasn't successful.
- I've looked through several discussion on this but wasn't able to find a solution, yet.
I would be grateful for any suggestions on how this situation can be solved, what I should be trying or what I need to read up on?