How to write hsql query with union all on dual tables
Like in oracle:
select 'a','b' from dual
select 'c','d' from dual
How to achieve this is hsql
I am using hsql 2.2.9
If you just want to construct a table from constant values, used this
values ('a','b'), ('c','d')
The above is equivalent to a SELECT that returns two rows and can be used in other selects and joins, for example:
select * from (values ('a','b'), ('c','d'))
If you need the DUAL table, enable the Oracle compatibility mode:
set database sql syntax ora true
In this mode, the following query works fine:
select 'a','b' from dual union select 'c','d' from dual
I have just found a bug in 2.2.9 where aggregations combined with UNION ALL do not work.
I have also made a comment adding replication details to a similar fixed bug which was made in the bug tracking system:
The aggregation with UNION ALL example doesn't throw an exception with the latest snapshot jar. Please try and report the result.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.