I am seeing a strange problem whilst using sqldeveloper that defies explanation
I have a *really* simple 3 table query that works when written one way and doesnt when written slightly differently e.g. :-
select * from table1 T1
inner join table2 T2 on T1.id1 = T2.id1
inner join table3 T3 on T2.id2 = T3.id2
This wasn't returning any rows, but when re-written as :-
select * from table1 T1
inner join table3 T3 on T2.id2 = T3.id2
inner join table2 T2 on T1.id1 = T2.id1
(yup... just swapped the order the 2 joins are listed)
Suddenly everything appeared.
- Also, if rather than SELECT * I use SELECT T1.* or variations I get results - although SELECT T1.*, T2.*, T3.* also fails.
Now this only happens through SQLDeveloper, if I used SQL+ both queries worked, and I wrote a small Java app to test it too, and both worked fine in that.
Does anyone have any ideas why this might be the case, and possible reasons for it to go wrong or things to clear/set to maybe fix it, as I hate it when you can't rely on the tools anymore (my SQL is poor enough without any added complications )
I have a *really* simple 3 table query that works when written one way and doesnt when written slightly differently e.g. :-
select * from table1 T1
inner join table2 T2 on T1.id1 = T2.id1
inner join table3 T3 on T2.id2 = T3.id2
This wasn't returning any rows, but when re-written as :-
select * from table1 T1
inner join table3 T3 on T2.id2 = T3.id2
inner join table2 T2 on T1.id1 = T2.id1
(yup... just swapped the order the 2 joins are listed)
Suddenly everything appeared.
- Also, if rather than SELECT * I use SELECT T1.* or variations I get results - although SELECT T1.*, T2.*, T3.* also fails.
Now this only happens through SQLDeveloper, if I used SQL+ both queries worked, and I wrote a small Java app to test it too, and both worked fine in that.
Does anyone have any ideas why this might be the case, and possible reasons for it to go wrong or things to clear/set to maybe fix it, as I hate it when you can't rely on the tools anymore (my SQL is poor enough without any added complications )