Skip to content
Advertisement

Token unknown in Firebird

This query is throwing an error on firebird, how to resolve that error?

Here is the error.

The following error information describes the failure

ODBC Call = SQLPrepareW()

SQL State = HY000

Native error = -104(FFFFFF98)

Error Message = [ODBC Firebird Driver][Firebird]Dynamic SQL Error

SQL error code = -104

Token unknown – line 1, column 111

Advertisement

Answer

(edit to include alternative, more modern syntax from comments)

Instead of SELECT TOP 1 ENAME, use any of the following:

  • SELECT ENAME ... FETCH FIRST ROW ONLY (SQL:2008, Firebird 3+)
  • SELECT ENAME ... ROWS 1 (non-standard, Firebird 2+)
  • SELECT FIRST 1 ENAME ... (non-standard, effectively Firebird 1.5+)

Also, use

instead of

For example, using FIRST 1:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement