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.

ESQL can't evaluate 'not equals'?

Featured Replies

I ran into an odd problem today with ExecuteSQL().  I was trying to run a query that would count things that were NOT set, i.e.:

ExecuteSQL (
    "SELECT COUNT ( ID_pk )
     FROM Updates
     WHERE ID_pk = ?  AND Replaced ≠ ? "
; ""  ; "" ; ParentID ; 1 )

Each parent could have a number of updates, but we only want one active at a time; so if the Update is marked as 'Replaced' then it is no longer active.

 

So my query above was returning a dreaded "?".  However, if I ran THIS query:

ExecuteSQL (
    "SELECT COUNT ( ID_pk )
     FROM Updates
     WHERE ID_pk = ?  AND Replaced = ? "
; ""  ; "" ; ParentID ; "" )

I got the correct result.  So it apparently doesn't want to consider a NULL value as a 'not equal to 1'?  And why didn't it just report 0?  Why the question mark?

 

I will probably define an auto-enter calc to set it to 0 in the first place, but it really seems like this query should work without that having to be defined as something non-empty.

 

Thanks,

J

Solved by Justin Close

Go to solution
  • Author
  • Solution

Doh!!  Apparently it doesn't recognize the "≠" operator.  When I replaced it with "<>" it worked fine.

Thank you for the links.  The first produces a 404 error until I remove the colon (or is that a semi-colon?) from the end.

Thanks - fixed now.

  • Author

Thanks for the links, Comment.  Very interesting behavior.  Good information to know about.

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.