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.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:91)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2269)
at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:614)
at
org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:152)
at myUnit.SampleApp.go(SampleApp.java:87)
at myUnit.SampleApp.main(SampleApp.java:107)
On Wed, Apr 21, 2010 at 11:19 AM, Eranda Sooriyabandara
<[email protected]> wrote:
> Hi Rick,
> Thanks for choosing it for me.
> I'll start the testing on it.
> Thanks
> Eranda
>
> On Wed, Apr 21, 2010 at 9:10 PM, Rick Hillegas <[email protected]>
> wrote:
>>
>> Hi Eranda,
>>
>> How about DERBY-4550 (qualified identifiers in ij)?
>>
>> Thanks,
>> -Rick
>>
>> Eranda Sooriyabandara wrote:
>>>
>>> Hi,
>>> I think I can earn some time for look at one or may more. So if anyone
>>> can choose one for me would be the best thing I think.
>>> Thanks
>>> Eranda
>>>
>>> On Wed, Apr 21, 2010 at 5:41 PM, Knut Anders Hatlen <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>> On 04/21/10 12:45 PM, Jayaram Subramanian wrote:
>>> > Hi Knut,
>>> > For buddy testing of Derby 4370 (using clause), I was going through
>>> > the jointest junit file to find the validation test cases and
>>> was just
>>> > wondering whether using both on and using in a singled sql statement
>>> > is allowed
>>> >
>>> > For example
>>> > JDBC.assertUnorderedResultSet(
>>> > s.executeQuery("select * from t1 left join t2 " +
>>> > "right join t3 on (d) using (b)"),
>>> >
>>>
>>> Hi Jayaram,
>>>
>>> It should be fine to mix ON and USING withing a single statement. The
>>> above statement should fail, though, because the ON clause ("on
>>> (d)") is
>>> invalid. The ON clause needs a boolean expression, like T2.A = T3.B.
>>>
>>> --
>>> Knut Anders
>>>
>>>
>>
>
>