开发者

Filemaker Sql Queries against columns with spaces in the name

I have an ODBC DSN setup to hit a Filemaker database from my ASP.Net application. I'm trying to form a valid query where the column name has spaces in it. In T-SQL, you would enclose 开发者_JS百科it in []. But I fail to get it to work in this case. Here's a valid query:

select * from ua_inventory where location like '%a%'

But this is not:

select * from ua_inventory where [item place] like '%a%'

I get the following error: [DataDirect][ODBC SequeLink driver][ODBC Socket][DataDirect][ODBC FileMaker driver][FileMaker]Parse Error in SQL

Does anyone have a clue how to form queries where the table and/or columns have spaces in the name?

Thanks in advance


Here are some example queries:

SELECT DISTINCT LastNameFirst, "Full Name" FROM "UA Biographies" ORDER BY LastNameFirst"
SELECT DISTINCT Categories FROM UA_Inventory ORDER BY Categories

The important thing to remember is objects (table name & column names) need double quotes

The back-n-forth comments at the bottom of this artcle really helped out: http://www.nathanm.com/filemaker-pro-odbc-quirks/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜