Subject | RE: [ib-support] Strange query results, based on where clause |
---|---|
Author | Ann W. Harrison |
Post date | 2002-03-01T18:23:54Z |
At 05:18 PM 2/26/2002 -0500, Bob Murdoch wrote:
The behavior is peculiar - wrong if you insist - but the problem
is with the dept field. It's defined as char(4) and the values are
all stored with leading zeros. It appears that Firebird is sometimes
doing a numeric comparison and sometimes a string comparison. The
first succeeds, the second fails. If you enter your department codes
as '0xxx', you'll get consistent results.
Regards,
Ann
>However, it still doesn't change the fact that adding another account toBob,
>the where clause suddenly makes the query start returning rows for the
>original account.
The behavior is peculiar - wrong if you insist - but the problem
is with the dept field. It's defined as char(4) and the values are
all stored with leading zeros. It appears that Firebird is sometimes
doing a numeric comparison and sometimes a string comparison. The
first succeeds, the second fails. If you enter your department codes
as '0xxx', you'll get consistent results.
Regards,
Ann