on 04-28-2009 1:20 PM
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!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.