Hi,
> select distinct a0.word from contexts.words a0 where (a0.word =
> cast('apple' as varchar)) and ((select count(a2) from (select a0.word
> as a2) a3) = (select 1)) order by a0.word
Sorry I don't understand what the query should do. Could you explain
it please? Is it the same as:
select word from words where word = 'apple' group by word having count(*) = 1 ?
> Is it intentional behavior of h2 engine or some kind of bug?
I tested your and similar queries with various databases but it only
works in PostgreSQL. While it can probably be made to work in H2, I
suggest to change the query so it works with all (or at least most)
databases.
> Is there any other possibility to access column in from clause of subselect?
I don't know, first I like to understand why you want to do that.
Regards,
Thomas
P.S. my test case:
drop table words;
create table words(word varchar(255));
select 1 from words a0 where (select count(a2) from (select a0.word as
a2) a3) = 1;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---