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.

Featured Replies

Hi all

I'm trying to utilise the NOT EXISTS command:

I need to find records in the Cases table that do not have matching records in the Originals table.

So far I have:

SELECT a.Case_ID
FROM Cases a
WHERE a.Closed IS NULL 
AND
NOT EXISTS
    (SELECT * 
     FROM Originals b
     WHERE b.Case_IDF = a.Case_ID)

            
It just freezes when I try this though. Could it be that because there are a lot of records in each table? I will be using additional criteria - not sure if this would improve performance if this is the case.


Any help appreciated.

Thanks

Most likely it is because "NOT EXISTS" is not supported in FM's SQL syntax.  Check the list of supported functions and keywords.

It looks, if I am reading this correctly, that you may just have a syntax problem. Each of the examples I've seen, EXISTS is only used directly after a where clause.

  • Author

Have got a script trigger to set a flag field in the parent table if no records existing in the child table, then just use a simpler SQL command. It took far too long to do it all in SQL.


Cheers guys

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.