Hi,

Thanks for your help! This is a bug, I wonder why it was not detected
before. The problem is: subqueries are sometimes converted to a SQL
statement again, and in this conversion the quotes are lost. Example:

select "x" from dual; // this throws an error, as it should
select * from (select "x" from dual); // this works

This will be fixed in the next release of course.

Regards,
Thomas


On Fri, Dec 5, 2008 at 5:48 PM, Jacek <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> The following fails:
>
> create table t (id int, "fk" int);
> alter table t add constraint t_t_fk foreign key ("fk") references t
> (id);
>
> throwing:
> Column FK not found; SQL statement:
> SELECT 1 FROM (SELECT "fk" FROM PUBLIC.T WHERE "fk" IS NOT NULL  ORDER
> BY "fk") C WHERE NOT EXISTS(SELECT 1 FROM PUBLIC.T P WHERE
> C."fk"=P.ID) [42122-104] 42S22/42122 (Help)
>
> Please help , I need to correct it quickly.
>
> Regards,
> Jacek
>
>
> >
>

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