Hi, in H2 1.1.110 (2009-04-03) - given this setup:
create table "M_1" ( "d1" int, "d2" int, VALUE DOUBLE); create table "M_2" ( "d1" int, "d2" int, VALUE DOUBLE); create table "D" ( "id" int); the following select statement fails (with a "Column D1.ID not found"): SELECT "m1"."VALUE" + "m2"."VALUE" "VALUE", "D1"."id" "d1", "D2"."id" "d2" FROM "D" "D1", "D" "D2" LEFT OUTER JOIN "M_1" "m1" ON "m1"."d1"="D1"."id" AND "m1"."d2"="D2"."id" LEFT OUTER JOIN "M_2" "m2" ON "m2"."d1"="D1"."id" AND "m2"."d2"="D2"."id" This statement gives an "Ambiguous column name d1" SELECT "m1"."VALUE" + "m2"."VALUE" "VALUE", "D1"."id" "d1", "D2"."id" "d2" FROM "D" "D1", "D" "D2" LEFT OUTER JOIN "M_1" "m1" ON "m1"."d1"="d1" AND "m1"."d2"="d2" LEFT OUTER JOIN "M_2" "m2" ON "m2"."d1"="d1" AND "m2"."d2"="d2" Actually the first statement runs on HSQLDB, the second not. So how is the statement to be written to succeed? Kind regards, Thilo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
