Re: HSQLDB with DBunit and Subqueries
Fred Toussi <[email protected]>
| Newsgroups | gmane.comp.java.hsqldb.user |
|---|---|
| Message-ID | <[email protected]> |
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, [email protected] 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