mdb工具sql查询表名称空间分隔 [英] mdb tools sql query table name space separated
本文介绍了mdb工具sql查询表名称空间分隔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试对我的.mdb数据库进行ODBC查询.我正在使用mdbtools驱动程序.该代码是使用Eclipse用C编写的.唯一的问题是,当我编写示例时:
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:
从MyTable GROUP中选择上周""
"SELECT 'last week' FROM MyTable GROUP"
它不起作用,因为它无法识别表格字段中的空格.我不知道MDB工具驱动程序使用的SQL语法.
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字段是:
MyTable fields are:
ID jobs last week
1 .. ...
2
...
有什么想法吗?
推荐答案
要用空格分隔名称,您需要使用方括号.
To delimit names with spaces in them you need to use square brackets.
"SELECT [last week] FROM MyTable GROUP"
这也适用于表名.
这篇关于mdb工具sql查询表名称空间分隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文