Gert,
Thanks for the reply. Will this be fixed in a future 7.5
release or will it only be fixed in 7.6?
Ryan
We are able to reproduce this join problem with LIKE predicate.
Gert
-----Urspr�ngliche Nachricht-----
Von: Ryan Warnick [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 4. M�rz 2005 02:28
An: [EMAIL PROTECTED]
Betreff: AW: Incorrect Query Result
Here is a simple test case that reproduces the problem. This returns
all rows in the T1 table, when it should only return one. If you change
the LIKE expression to only have a trailing wildcard, then it returns
the correct result. The index on the field (F4) that the LIKE
expression is applied to seems to be related to the problem in some way,
because if you drop the index the query returns the correct result.
create table T1 (k1 numeric, f1 varchar(10), f2 varchar(10), primary key
(k1))
create table T2 (k2 numeric, f3 numeric, f4 varchar(10), primary key
(k2))
insert into T1 values (1,'test1', 'test2')
insert into T1 values (2,'test1', 'test2')
insert into T1 values (3,'test1', 'test2')
insert into T1 values (4,'test1', 'test2')
insert into T1 values (5,'test1', 'test2')
insert into T2 values (1,2, 'oneT1')
insert into T2 values (2,4, 'fourT4')
insert into T2 values (3,5, 'fiveT5')
create index ID2 on T2(F4)
SELECT T1.K1, T1.F1, T1.F2, T2.F4 FROM T1 LEFT OUTER JOIN T2 ON T1.K1 =
T2.F3 WHERE (T2.F4 LIKE '%one%')
Ryan