tberthel / jiql

Automatically exported from code.google.com/p/jiql
0 stars 0 forks source link

Inner Join Problem #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a table structure defined as below;

Test2
------
id
name

Test3
------
id
name

Test4
------
id1
id2

When i try to join 2 tables:
select * from test2 test2 inner join test4 test4 on test2.id = test4.id1 --> 
this is ok

But when i try to add third table to the query:
select * from test2 test2 inner join test4 test4 on test2.id = test4.id1 inner 
join test3 test3 on test3.id = test4.id2 --> this is not working

Original issue reported on code.google.com by guven.ko...@gmail.com on 3 Nov 2010 at 9:27

GoogleCodeExporter commented 9 years ago
It seems like there is also issue for this type of statement -

SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid 
= '18iipbZORE4AAAASzgBVAu'

1. jiql will somehow parsed INNER JOIN into just INNER.
2. jiql seems to have issue getting the columns' name if the select clause 
contains wildcard i.e. u.* and s.*

I observed the above by looking at the codes and stepping through it. I am not 
able to understand the codes fully, thus not able to know where the breakdown 
occur thus I can not recommend any solution.

This is valid even with the new codes uploaded today by the owner of jiql.

Original comment by xaw...@gmail.com on 16 Dec 2010 at 3:30