Jump to content

Connecting to SQL data w/FM


Brent C
 Share

This topic is 5766 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hopefully this is easy. I am new to using the ODBC connections. I want to use Filemaker to pull data from an existing SQL database. Simple enought to do when there are 2 tables involved. I am stuck trying to figure out how to tell filemaker I want to join more than one table? If anyone could point me in the right direction I would be very greatful.

Link to comment
Share on other sites

If you want to join records from multiple tables, the key is the WHERE statement in SQL...

so it you have a one-to-many relationship with a primary key and foreign key fields..

SELECT (bunch of fields) FROM (bunch of tables) WHERE (some condition limiting the records returned)

example:

SELECT "DEPARTMENT"."acct_area", "DEPARTMENT"."dept_name", "ACCOUNT"."acct_title"

FROM "DEPARTMENT", "ACCOUNT"

WHERE "DEPARTMENT"."acct_area" = "ACCOUNT"."acct_area"

This will pull all the account records along with the related department information. The built-in query builder helps you get the syntax right...

Link to comment
Share on other sites

This topic is 5766 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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