cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with JOINS after upgrading to MaxDB 7.6

Former Member
0 Kudos

I have recently upgraded from MaxDB 7.5 to 7.6 and now many of my SQL queries are producing weird results. I have figured out that it must have something to do with the JOINS I am using.

For example, I have the following kind of query:

select fp.id , p.name , t.drug

from v_find_patient fp

join t_patient p on fp.patient_id=p.patient_id

join t_therapy t on fp.patient_id=t.patient_id

where fp.center=10500 and t.drug='Cortison'

From my knowledge, the JOINS should now be interpreted as INNER JOINS.

However, when I run this query on MaxDB 7.6, the result is that of a LEFT JOIN.

I.e. as if I wrote:

left join t_therapy t on fp.patient_id=t.patient_id

So the result includes rows such as:

34;Jones;null

What's even stranger: If I use a FULL JOIN, i.e.

full join t_therapy t on fp.patient_id=t.patient_id

I suddenly get the correct result (that of an inner join)

Can anyone help?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

Hi Abu,

please provide more information and an example that can be used for reproduction.

We need:

- ddl for the tables/indexes

- some data to work on

- the query

- your results

- the exact database versions used

regards,

Lars

Answers (0)