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, Everyone,

Is there any way to use FileMaker's Internal SQL on a solution, where the names of the fields contain spaces?

Statements like:

SELECT Last Name from People WHERE Team Role = 'Judge'

or even

SELECT zzID from People WHERE Last Name = 'Tan'

fails spectacularly - I think because the SELECT clause expects a comma delimited list of field names. Here, the field names in my solution use spaces (for legibility - and FM does not complain when I do that).

I have tried SELECT 'Last Name' but that only gives the literal in every row.

The FM ODBC/JDBC Guide is not much help. All it says on page 47 (Field Names) is

"The most common expression is a simple field name, such as calc or Sales_Data.Invoice_ID." (thanks!)

It should't make any difference, but I am using the BaseElement plugin 1.2.1 to send the query to FileMaker.

Any help would be gratefully appreciated. Thank you in advance.

Regards,

Chong-Yee

I hope you have figured this out by now. If not here are 2 methods:

Use the Quote function

"SELECT " & Quote( Last Name) & " from People WHERE " & Quote( Team Role ) & " = 'Judge'"

or use the Escape ( \ ) with quote

"SELECT \"Last Name\" from People WHERE \"Team Role\" = 'Judge'"

  • 1 month later...
  • Author

I hope you have figured this out by now. If not here are 2 methods:

Use the Quote function

"SELECT " & Quote( Last Name) & " from People WHERE " & Quote( Team Role ) & " = 'Judge'"

or use the Escape ( ) with quote

"SELECT "Last Name" from People WHERE "Team Role" = 'Judge'"

Thank you very much for this, Ralph!

  • 4 months later...
  • Newbies

In FileMaker 12 I could not get the Quote() method to work with with field name with spaces, but the escaped quotes worked fine:

"SELECT "Last Name" from People WHERE "Team Role" = 'Judge'"

  • Author

In FileMaker 12 I could not get the Quote() method to work with with field name with spaces, but the escaped quotes worked fine:

"SELECT "Last Name" from People WHERE "Team Role" = 'Judge'"

Thanks very much for the update, Scott. I'm on 11 at the moment and until the problems with speed with 12 are resolved, unlikely to upgrade. But it's useful to know that the ExecuteSQL script step woks somewhat differently from the plugins.

  • 3 years later...
  • Newbies

I have just started learning SQL, in order to use the quote function in this example, you need to :

 

"SELECT " & Quote( "Last Name") & " from People WHERE " & Quote( Team Role ) & " = 'Judge'"

seems odd that you need to quote the quote, but I guess it's because quote normally looks for a filemaker field, whereas we are quoting a literal here

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.