Jump to content
Sign in to follow this  
Ingar

SQL query for ODBC trouble

Recommended Posts

Hello!

I'm trying to open an SQL database with Filemaker Pro 5.0V1.

The SQL statement says:

SELECT Customer.CustomerNo, Customer.Name

FROM Customer

I get an error saying Object name Customer is invalid.

To correct this I must add the table owner as shown below.

SELECT MDBS.Customer.CustomerNo, MDBS.Customer.Name

FROM MDBS.Customer

MDBS beeing the user / owner of the SQL table.

Is there any way to omit this editing in every query? Either in the DSN or in the SQL database.

Share this post


Link to post
Share on other sites

I've got exactly the same situation when I query my school's student information system. In Filemaker, I have to manually enter the fully qualified table and column statements.

My first thought was that this was some quirk of the program that created the SQL db ('cause they all have slightly different requirements). But then I was in Excel, querying the exact same db, using Microsoft's query tool. It generated a SQL statement withOUT the full qualifiers and it ran just fine. Sheesh...now what?

I'm still thinking this through. My school's closed for the summer so it's not easy for me to get in. But when I do, I'm gonna try this: create a SQL query in Excel, make sure it runs, copy the complete statement into an "Execute SQL" step in a Filemaker script, and then try and run it from there. If it works, at least I can use Excel's query tool instead of Filemaker's.

Luckily, it's a lengthy query but I don't have to change it much once it runs properly.

John McInerney

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.