Using the ExecuteSQL function

The FileMaker Pro ExecuteSQL function lets you retrieve data from table occurrences named in the relationships graph but independent of any defined relationships. You can retrieve data from multiple tables without creating table joins or any relationship between the tables. In some cases, you may be able to reduce the complexity of your relationships graph by using the ExecuteSQL function.

The fields you query with the ExecuteSQL function do not have to be on any layout, so you can use the ExecuteSQL function to retrieve data independent of any layout context. Because of this context independence, using the ExecuteSQL function in scripts may improve the portability of the scripts. You can use the ExecuteSQL function anywhere you can specify calculations, including for charting and reporting.

The ExecuteSQL function supports only the SELECT statement.

Also, the ExecuteSQL function accepts only the SQL-92 syntax ISO date and time formats with no braces ({}). The ExecuteSQL function does not accept the ODBC/JDBC format date, time, and timestamp constants in braces.

For information about the syntax and use of the ExecuteSQL function, see FileMaker Pro Help.