ExecuteSQL basics in FileMaker
IntermediateFileMaker's ExecuteSQL function lets you query any table without a relationship. Learn the syntax, common patterns, and the most common pitfall: date and text quoting.
What you'll learn
- The ExecuteSQL function signature and how to call it
- How to pass field separators and correctly quote text vs dates
- Common aggregate queries: COUNT, SUM, AVG
ExecuteSQL runs a SQL SELECT query against any table in your FileMaker file without requiring a relationship. It is powerful for reporting, cross-table lookups, and aggregations — but its date handling and quoting rules trip up almost every developer the first time.
Stuck is a valid status
Need a second brain on this one?
If this lesson just collided with your real schema, script stack, or deadline, book consulting and turn the confusion into a concrete plan.
The ExecuteSQL signature
ExecuteSQL ( sqlQuery ; fieldSeparator ; rowSeparator { ; arguments... } ) — the field and row separators define what goes between columns and rows in the result. Arguments (?) are used for parameterized values.
ExecuteSQL ( "SELECT Name, Email FROM Customers WHERE Active = 1" ; "," ; // field separator "¶" // row separator (¶ = return character) )
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo