Skip to Content
Former Member
Oct 28, 2011 at 01:35 PM

wrong results with LEFT JOIN and maxdb


We just migrated the db for our (non sap) application from 7.6 to

Now we ran into a problem because the new version returns different (wrong) results.

I debuged a while and now the problem can be reproduced with the following

very simple statements:

create table test (a int, b int)

insert into test values(1,1)

insert into test values(2,2)

insert into test values(3,3)

select t1.a, t2.a, t2.newcol

from test t1 left join (select a, 'X' as newcol from test where b = 2) t2 on t1.a = t2.a

This returns:


1; ?; X <-- !!

2; 2; X

3; ?; X <-- !!

With version 7.6. it returned the correct result:


1; ?; ?

2; 2; X

3; ?; ?

The problem is caused by the constant value in the select-clause

Is this a known bug? is there any workaround, or bug fix available ?