Jump to content

SQL join in JDBC?


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

Recommended Posts

  • Newbies

I'm trying to do a simple inner join via JDBC, but all I get is an "invalid argument" error. I've even tried creating a very simple pair of files to test with (in case my real data was causing the problem):

Table 1: name.fp5

Name_ID Name

1 Fred

2 Joe

3 Sam

Table 2: phone.fp5

Name_ID Phone

1 555-1234

2 555-4321

1 555-1111

3 555-1357

I've tried 3 SELECTs - the first two work just fine, but not the third:

SELECT * FROM "name.fp5" WHERE "name.fp5".Name='Fred' (WORKS)

SELECT * FROM "phone.fp5" WHERE "phone.fp5".Name_ID=1 (WORKS)

SELECT * FROM "name.fp5", "phone.fp5" WHERE "name.fp5".Name_ID="phone.fp5".Name_ID

(ERROR)

The above syntax does work against MySQL and a MS SQL Server databases (which are my primary platforms) with the same setup. I've tried every variation that I can think of against the FM database with no success. Is there a way to get this to work?

My main limitation is that the final product will be doing a join on 9 tables (files), as this is the data the client provided.

Link to comment
Share on other sites

  • 1 month later...

Filemaker is not a real Relational db like Sql server or Oracle.

And the SQl syntaxe used with FMP jdbc is different as the standard sql language.

Join is not a part of the FMP/JDBC Sql

You need to use standard FMP relation and use an array to retreive data.

Link to comment
Share on other sites

This topic is 7377 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
×
×
  • Create New...

Important Information

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