Subject Re: [firebird-support] Complete and Total Loss
Author Helen Borrie
At 02:12 AM 3/02/2005 -0800, you wrote:

>I am totally baffled by this one:
>
>ISC ERROR MESSAGE
>Dynamic SQL Error
>SQL error code = -204
>ROWS WITH TIES requires ORDER BY clause
>PHONE
>
>FOR SELECT LEAD_TRACKING_ID,CAST(PHONE AS
>NUMERIC(10,0)),FIRSTNAME,MIDDLENAME,LASTNAME,ADDRESS,CITY,ST_ABBREV,ZIP ||
>'-' || ZIP4,
> CARD_LAST4,CARD_EXP,CARD_ABBREV
> FROM MASTERLEADS,MASTERACTIVITY
> WHERE MASTERLEADS.PHONE = MASTERACTIVITY.PHONE AND MASTERACTIVITY.TRID =
>:TRID
> INTO
>:LEAD_TRACKING_ID,:PHONE,:FIRSTNAME,:MIDDLENAME,:LASTNAME,:ADDRESS,:CITY,:ST
>ATE,:ZIP,:LAST4,:CARDEXP,:CARDTYPE
>DO BEGIN
> SUSPEND;
>END
>
>I am trying to create this procedure on Firebird 1.5. It used to work just
>fine on IB 7.1. I just don't get it. I tried putting an ORDER BY PHONE
>after the WHERE clause, but no good. I really sort of need some help here.
>I cant get information out of db any other way.

OK, the interbase.msg file is not compatible with firebird.msg, so you must
remove or rename it (but not as firebird.msg). remove the IB 7
interbase.msg file from the client (firebird uses a different message file)
- simply remove it, it shouldn't be there anyway

Make sure that firebird.msg is being read, and then you will get the
correct message for the error that is being encountered in the SQL. I
suspect it is a data conversion problem, attempting to cast a string to a
numeric and then casting back to a string again.

Wrong message file apart, as a general observation, you are likely to bump
into a few places where "bad" SQL is allowed in IB 7 but not allowed in
Firebird. And there are some things that Borland didn't copy from us: as
it happens, the ROWS syntax is one. Firebird has SELECT FIRST.... syntax
instead...Firebird 2 has both, but not Borl's non-standard version...

./heLen