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.

Adapting relationship with SQL is slow

Featured Replies

Hello

Knowing a realtionship is NOT case sensiive, I am trying to create and equivalent in SQL. But SQL is case sensitive. What I came up with is the first sql statement. But this statement is really slow, compared to the second statement, which doesn't give correct result, because of case differences.

Does anyone have a clue on how to create a good equivalent, without modifying records??

1.

BE_FileMakerSQL ( "

SELECT

sn."Seriennr.", sum(ap.Menge) SN from Seriennummern sn

INNER JOIN

Artikelposten ap on lower(sn."Seriennr.")=lower(ap."Seriennr.")

WHERE

lower (sn."Artikelnr.") = lower('" & "PN0605-01" & "')

GROUP bY

sn."Seriennr."

HAVING

sum(ap.Menge)>0

" )

2.

BE_FileMakerSQL ( "

SELECT

sn."Seriennr.", sum(ap.Menge) SN from Seriennummern sn

INNER JOIN

Artikelposten ap on sn."Seriennr."=ap."Seriennr."

WHERE

sn."Artikelnr." = '" & "PN0605-01" & "'

GROUP bY

sn."Seriennr."

HAVING

sum(ap.Menge)>0

" )

  • Author

Let me guess. Filemaker is storing the indexes in either lower or upper case, depending on the language setting for a table field ?? right ?

but please correct me otherwise :)

All those calculations in your SQL WHERE & GROUP BY statements are your problem. Why not add a column or field to tables that is an auto-entered calculation that makes the Lower Case calculation. Use these columns or fields in you SQL. This should not affect any thing in your database and users need not be aware of it. Change lower('" & "PN0605-01" & "') to 'pn0605-01'").

To see the Index put the cursor in the field then go to the Insert Menu and select From index..., Command I does this on a Mac.

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.