FileMaker SQL error codes

During SQL query parsing or execution, SQL queries to a FileMaker data source can return an error code and message. These errors can be returned by the ExecuteSQLe function, the ExecuteSQL function when used in the Data Viewer in FileMaker Pro, and the FileMaker ODBC/JDBC client drivers that other applications use.

Errors include information in this format:

FQLxxxx/(line:offset): message

where:

  • FQLxxxx is one of the error codes below

  • line and offset are the line number and offset to the character where the error begins in the SQL query

  • message is a description of the error

Only one error is returned at a time. If more than one error is present, another error is returned after the current error is resolved.

Error code Message

FQL0001

There is an error in the syntax of the query.

FQL0002

The table named "<name>" does not exist.

FQL0003

The table named "<name>" already exists in this query.

FQL0004

The query is too complex. The maximum number of tables has been exceeded.

FQL0005

Expressions involving aggregations are not supported.

FQL0006

The column named "<name>" appears in more than one table in the column reference's scope.

FQL0007

The column named "<name>" does not exist in any table in the column reference's scope.

FQL0008

The table named "<name>" does not exist in the column reference's scope.

FQL0009

The column named "<name>" does not exist in table "<name>".

FQL0010

The literal value "<name>" is not a valid DATE, TIME or TIMESTAMP.

FQL0011

Predicate must contain a logical operation (=, <, OR, AND, IS NULL, ...).

FQL0012

The ordinal reference "<name>" in the ORDER BY clause is not valid.

FQL0013

Incompatible types in assignment.

FQL0014

The number of values in a VALUES row value constructor does not match the number of values in the target.

FQL0015

The number of values in an INSERT...SELECT statement does not match the number of values in the target.

FQL0016

A subquery contains an illegal outer reference to a column in the INSERT's target table.

FQL0017

An expression contains data types that cannot be compared.

FQL0018

An expression contains incompatible data types.

FQL0019

The result data type of a CASE expression cannot be inferred; they are all NULL.

FQL0020

An invalid number of parameters was supplied to the function "<name>"

FQL0021

Parameter number <name> to the function "<name>" is not of the correct type.

FQL0022

A subquery expression must have exactly one value in the SELECT list.

FQL0023

A CAST expression requested an invalid data type conversion.

FQL0024

A reference to ROWID must be qualified if more than one table is present in the query.

FQL0025

All non-aggregated column references in the SELECT list and HAVING clause must be in the GROUP BY clause.

FQL0026

The number of columns in both inputs to a UNION operation must be the same."

FQL0027

The data types of corresponding columns in the inputs to a UNION operation must be the same.

FQL0028

Field repetitions must be numeric and between 1 and <name>.

FQL0029

A field repetition in the SET clause of an UPDATE statement must be a constant.

FQL0030

"<name>" is an invalid function.

FQL0031

The parameter's type cannot be inferred in this context. At least one query parameter must be an expression, a column or a constant.

FQL0032

A query may contain either named parameters or dynamic parameters, but not both.

FQL0033

Column names in FROM clause subqueries must be unique.

FQL0034

The number of output columns in a FROM clause subquery must match the number of columns in the table's name list.

FQL0035

Cursor support is not enabled for this query.

FQL0036

A cursor with the name "<name>" already exists.

FQL0037

There is no cursor with the name "<name>".

FQL0038

The cursor "<name>" is already open.

FQL0039

The cursor "<name>" is not open.

FQL0040

The target cursor "<name>" does not reference a query that is valid for WHERE CURRENT OF <cursor>.

FQL0041

The target cursor "<name>" does not reference the same table as the current statement.

FQL0042

The default value for column "<name>" does not match the column's data type.

FQL0043

The string "<name>" is not a valid stream name.

FQL0044

The column "<name>" is not valid in this context. The targets of GETAS and PUTAS must be Container fields.

FQL0045

The value <name> is not a valid binary string.

FQL0046

Container fields are not allowed in UNION DISTINCT queries.

FQL0047

The database schema has changed. This prepared query is no longer valid.

FQL0048

This statement contains an invalid operation on FileMaker system table "<name>".

FQL0049

Aggregation expressions are not allowed in the WHERE clause.

FQL0050

The offset count in OFFSET clause is not valid.

FQL0051

The FETCH ... WITH TIES clause is not allowed without a corresponding ORDER BY clause.

FQL0052

The fetch count in FETCH clause is not valid.

FQL0053

The cursor is already open.

FQL0054

The cursor is not open.

FQL0055

The cursor has already been declared.

FQL0056

The cursor is missing.