mdb tools sql query table name space separated

浪子不回头ぞ 提交于 2019-12-12 04:41:55

问题


I'm trying to make an ODBC query for my .mdb database. I'm using mdbtools driver. The code is written in C using Eclipse. The only problem is that when I write for example:

"SELECT 'last week' FROM MyTable GROUP"

it doesn't work cause it cannot recognize the space separator from the table field. I have no idea about the SQL syntax used by MDB tools driver.

MyTable fields are:

ID   jobs  last week  
1     ..      ...  
2  
...  

Any ideas?


回答1:


To delimit names with spaces in them you need to use square brackets.

"SELECT [last week] FROM MyTable GROUP"

This also works for table names.



来源:https://stackoverflow.com/questions/12696259/mdb-tools-sql-query-table-name-space-separated

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!