Re: HSQLDB with DBunit and Subqueries

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: HSQLDB with DBunit and Subqueries

Fred Toussi-2
Set the Oracle syntax compatibility mode and use rownum instead of
rownumber

Select * from (select rownum as rn, a.* from (select * from tablea) a)
where rn > 0 and rn<=5

Fred

On Thu, Sep 26, 2013, at 13:14, [hidden email] wrote:

> Hello Fred,
>           I am using dbunit to compare two tables and it works fine with
>           any type of queries. But to unit test it I have been trying to
>           use HSQLDB. But I am facing a problem with a query inolving sub
>           queries. I am currently using HSQLD v 2.3.0. The query for
>           example is:
>
> Select * from (select rownumber as rn, a.* from (select * from tablea) a)
> where rn > 0 and rn<=5;
>
> Regards,
> Manjul Bhattarai
> This query seems to work with dbunit and oracle but doesn't seem to work
> with dbunit and hsqldb.
>
> Error says " Did not find column 'COL3' for <schema.table>
> 'SYSTEM_SCHEMA.SYSTEM_SUBQUERY' in catalog 'PUBLIC' because names do not
> exactly match", COL3 is a column of tablea, similarly it did not find any
> columns of tablea along with RN.
>
> _____________________________________
> Sent from http://hsqldb.10974.n7.nabble.com
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Loading...