Subject Re: [IBO] IBO 3.6 query parser makes mistakes with comments
Author Helen Borrie
At 12:02 PM 30-08-01 +0200, you wrote:
>The IBO Query parser has problems when part of the ORDER BY is actually a
>comment.
>
>The statement below put into a TIBOQuery.SQL generates the following error:
>
>Error:
>
>ISC ERROR CODE:335544569 ISC ERROR MESSAGE: Dynamic SQL Error SQL error
>code = -104 Token unknown - line 21, char 9 ASC STATEMENT:
>TIBOInternalDataset:
>"VacancyTurnAroundTimeIBOQuery.IBOqrVacancyTurnAroundTimeIBOQuery"
>stHandle=32301556 (ERROR)

Jeroen,

I use comments in my SQL all the time and have never encountered a situation where the parser did anything with them except what is expected.


The error is happening here:

>from vacancyturnaroundtimereport
>
>join VacancyOverView(vacancyturnaroundtimereport.companyid,
>vacancyturnaroundtimereport.vacancyid)
> on 1=1

This isn't valid join syntax.

The join syntax is

select a.Something
...
, b.somethingelse...

from aTable a
join bTable b
on
a.Keycolumn = b.Keycolumn

and

"on 1=1" would have no meaning to the IBO parser or to the server.

What the monitor is spitting out is alphabet soup, since your statement is "unparsable" in the pieces which the IBO parser plays with (join criteria, parameters and the WHERE clause).

rgds,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________