Subject Re: Parser messes up SQL containing FIRST
Author aleksander_oven

> It shouldn't fail. It will fail to return any rows if there is no
> row with ID = 1. What is the "failure" you are encountering?

Silly me... I forgot to include the error message I'm getting.
Here it is:

ISC ERROR CODE:335544569

Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, char 6

Obviously, the comma is upsetting the db server.

I traced it down to the TIB_Statement.SysExecPrepare method, where the
exception is raised after execution of these two lines:

MakeServerSQL( RefinedSQL, nil, nil, nil, tmpSQL, ParamChar, false,
tmpLen );
errcode := API_Prepare( PChar( tmpSQL ), New_In, New_Out );

At this point both RefinedSQL and tmpSQL variables contain the SQL
string I posted before.

Again, I'm sorry for not being clear the first time. I hope we can
find an answer to this problem.

Kind regards,
Aleksander oven