Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SQL join in JDBC?

Featured Replies

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

Are the single digit numbers (the "1" that precedes "Fred" and the "1" that precedes "555-1234") each seperate fields? It's a little hard to tell by your example.

  • Author
  • Newbies

Heh - on my screen those were nicely spaced. Auto-formatters...

Yes, those are two seperate fields, with "name.fp5".Name_ID being a serial number, and "phone.fp5".Name_ID intended to be a reference to the first table.

  • Author
  • Newbies

I should also say, that what I expect from the final SELECT is a table like: (Though order may differ)

Name_ID Name Name_ID Phone

1 Fred 1 555-1234

1 Fred 1 555-1111

2 Joe 2 555-4321

3 Sam 3 555-1357

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.