db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: gentle reminder: buddy testers needed
Date Tue, 27 Apr 2010 05:20:30 GMT
On 04/27/10 04:39, Jayaram Subramanian wrote:
> Hi Knut,
> I was continuing to buddy test the Derby 4370 (using clause) and when
> trying to run the following hit the error attached... Dont know though
> whether its a valid test or not
> 
> s.execute("create table t1(a int, b int, c int)");
> 	        s.execute("create table t2(a int, b int, c int)");
> 	        s.execute("create table t3(a int, b varchar(5), c int)");
> 
> 	        s.execute("insert into t1 values (1,2,3),(2,3,4),(4,4,4)");
> 	        s.execute("insert into t2 values (1,2,3),(2,3,4),(5,5,5)");
> 	        s.execute("insert into t3 values " +
> 	                "(2,'abc',8),(4,'def',10),(null,null,null)");
> 
> ResultSet rs=s.executeQuery("select * from t1 join t2 using (a) join
> t3 using (c)");
> 
> 
> Error encountered
> =====================================
> java.sql.SQLSyntaxErrorException: Column name 'C' is in more than one
> table in the FROM list.

Hi Jayaram,

I think this error is expected. Since both T1 and T2 contain a column
named C, the second join operator doesn't know whether it should join on
T1.C=T3.C or on T2.C=T3.C.

Thanks,

-- 
Knut Anders

Mime
View raw message