Subject RE: [ib-support] Strange query results, based on where clause
Author Wilson, Fred
Ann,
I just tried it under IB5.6 and the results are the same, as you
descibed below. That is the first query returned no rows, the second query
returned one row.

Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>



-----Original Message-----
From: Ann W. Harrison [mailto:aharrison@...]
Sent: Friday, March 01, 2002 12:04 PM
To: ib-support@yahoogroups.com
Subject: RE: [ib-support] Strange query results, based on where clause



Here is a fairly simple test that demonstrates the problem
Bob Murdoch was having. The reason his program appeared so
flaky is that changing the where conditions affected index
usage. His application compared a number, stored in a character
field with a leading zero, to a numeric value.

This script demonstrates the problem:

create table T1 (F1 char(4), F2 char(4));
create index T1_F1 on T1 (F1);
insert into T1 (F1, F2) values ('001', '001');
insert into T1 (F1, F2) values ('002', '002');
insert into T1 (F1, F2) values ('003', '003');
insert into T1 (F1, F2) values ('004', '004');
insert into T1 (F1, F2) values ('005', '005');
insert into T1 (F1, F2) values ('006', '006');
insert into T1 (F1, F2) values ('007', '007');
insert into T1 (F1, F2) values ('008', '008');
insert into T1 (F1, F2) values ('009', '009');

commit;
select * from t1 where f1 = 3;
select * from t1 where f2 = 3;

The first query returns no results. The second returns
one row.

The problem appears on dialect 1 and dialect 2 databases
with Firebird.

If anyone out there can help, I'd really like to know if
the problem appears in IB 6.0 (open or commercial), IB 6.5,
and IB 5.6.

Thanks


Ann



Yahoo! Groups Sponsor

ADVERTISEMENT

<http://rd.yahoo.com/M=215002.1818248.3328688.1261774/D=egroupweb/S=17051153
86:HM/A=847665/R=0/*http://ads.x10.com/?bHlhaG9vbW9uc3RlcjcuZGF0=1015009552%
3eM=215002.1818248.3328688.1261774/D=egroupweb/S=1705115386:HM/A=847665/R=1>


<http://us.adserver.yahoo.com/l?M=215002.1818248.3328688.1261774/D=egroupmai
l/S=1705115386:HM/A=847665/rand=800447081>

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .