Hi

During translation of one of my recent projects from PostgreSQL to H2
database I found specific kind of expressions which were acceptable
for PostgreSQL but cause errors in H2. In Postgres it is possible to
access
column in from clause of subselect used in where clause like here:

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

but in H2 it causes:

org.h2.jdbc.JdbcSQLException: Column A0.WORD not found; SQL statement:
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 [42122-78]

Is it intentional behavior of h2 engine or some kind of bug? Is there
any other possibility to access column in from clause of subselect?
--
Marek Kubis

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to