Subject RE: [IBO] SQL SELECT problem
Author Helen Borrie
At 12:32 AM 15/03/2003 +1100, you wrote:
>the following (typed directly into interactive SQL in IBOConsole) returns 9
>rows:
>
>SELECT * FROM FCDX_ZONES WHERE DESCRIPTION CONTAINING 'A14' ORDER BY
>DESCRIPTION
>
>changing this to:
>
>SELECT FIRST 5 * FROM FCDX_ZONES WHERE DESCRIPTION CONTAINING 'A14' ORDER BY
>DESCRIPTION
>
>
>results in (Cut and paste this time):
>
><<ISC ERROR CODE:335544569
>
>ISC ERROR MESSAGE:
>Dynamic SQL Error
>SQL error code = -104
>Token unknown - line 2, char 6
>,
>
>STATEMENT:
>TIBOInternalDataset:
>"<TApplication>.frmMain.dlgWisql_3.<TIBOQuery>.<TIBOInternalDataset>."
>
>Statement: SELECT FIRST 5 * FROM FCDX_ZONES WHERE DESCRIPTION CONTAINING
>'A14' ORDER BY DESCRIPTION >>
>
>The same query, cut and pasted into IBAccess results in 5 rows returned.
>
>This is a different query than previously (below) described, but on the same
>table.
>
>the following:
>
>SELECT FIRST 10 * FROM MPERSON WHERE PERLAST CONTAINING 'STE' ORDER BY
>PERLAST
>
>against a table in the same database results in 10 records...
>
>The DB is Firebird 1.0 on Windows 2000 and Win NT4. The database uses
>Dialect 3. The results using IBO_XXX V4.2.I is the same.
>
>There are no hidden characters, (I retyped the whole string, etc) and the
>above is pasted from IBO_Console. The contents of 'XXX' is normally suppled
>dynamically and always seems to cause the error. I have just dropped the
>table and re-built it with ISQL and get the same results. The problem
>persists between a local DB (Win 2000 Laptop) and the server (Win NT4 SP6).
>
>The constant is that against this table anything with 'FIRST X' fails, but
>works (as above) in a different query. I am at a loss, I can work around the
>problem, but would like to know what I am doing wrong!!!
>
>Any help appreciated - Phil Stephens :-(

Phil,
It could be a bug in IBOQuery. Do you have the same problem if you do the
same query in an app? or using IB_SQL? I have all the same hardware and
software setup as you have. I can't make the query misbehave like yours.

>PS: Helen... Having read the interview... I thought we (Aussies) drove you
>crazy by calling Australia "the main island". ;-)

Well, it is a little bit bigger than Tasmania and Christmas Island...

cheers,
Helen