tags:

views:

198

answers:

1

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 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

+1  A: 

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/

TexasT