MATLAB: Using Database Toolbox Visual Query Builder to query data from columns with non-standard identifiers results in an error

Database Toolboxquerybuilder

Using Visual Query Builder to insert data to or select data from a column named "Date/Time" results in the following error:
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. \ Expected 2.
The same error is returned in the message field of the cursor object if the query is performed using MATLAB code, as in the following example:
e = exec(conn,'SELECT ALL Date/time FROM temptable');

Best Answer

The abilty to querying database objects with non-standard identifiers using Visual Query Builder in the Database Toolbox is not available.
Identifiers are used for table names, column names, views, and user-created database objects. The specifics of what constitutes a non-standard identifier depends on which database you are using. In general, reserved SQL keywords (such as "DATE" and "FROM") are not valid identifiers and cannot be used as table or column names, though some databases may allow them. Additionally, some databases may interpret punctuation marks as operators (for example, "/" may be interpreted as a division operator). Avoid using SQL keywords and punctuation marks in your identifiers where possible. Spaces are allowed in identifiers and should work with Visual Query Builder, but using spaces in an identifier is considered poor style. Also avoid using an all numeric identifier like "13", as this will often be interpreted as the number 13 instead of the column name "13".
To work around this issue, place quotes (" ") or brackets ([ ]) around the non-standard identifier. Whether to use quotes or brackets depends on which database you are using.
For example, to do the query described in the Summary field within Microsoft Access, replace the "SQL statement" field of Visual Query Builder with the following text:
SELECT ALL "Date/time" FROM temptable
or you can use the following MATLAB code
e = exec(conn,'SELECT ALL "Date/time" FROM temptable');