Hi
We are using the flag DATABASE_TO_UPPER=FALSE to prevent all table names
being converted to uppercase.
This works for tables.
However, when creating views the SQL statements are created with uppercase
table names.
E.g.
CREATE VIEW [kjoptfra] (Animal_Id, Reason, kjonn, OriginMarking)
AS (
SELECT
Animal_Id,
Reason,
BirthInfo.gender,
Animal.OriginMarking
FROM [AnimalHistory], [BirthInfo], Animal
WHERE Reason IN ('InFromUncontrolledHerd_2', 'InFromOwnHerd_1')
AND Animal_Id = [Animal].Id
AND [Animal].Id = Birthinfo.id
AND [BirthInfo].Gender = 'Female');
The db is created successfully with schema and views, however, when running
the query "select * from "kjoptfra";
it fails with the following error
[2016-04-14 10:50:26] [90109][90109] View "PUBLIC.""kjoptfra""" is invalid:
"Column ""BIRTHINFO.Gender"" not found [42122-191]";
As you can see, the sql statements now uses uppercase table names, and
therefore fails.
Is there a workaround for this?
We are also using the IGNORECASE=true flag, but this seems to apply to
columns only
[2016-04-14 10:50:26] [90109][90109] View "PUBLIC.""kjoptfra""" is invalid:
"Column ""BIRTHINFO.Gender"" not found [42122-191]"; SQL statement:
select * from "kjoptfra" [90109-191]
[42S22][42122] Column "BIRTHINFO.Gender" not found; SQL statement:
CREATE FORCE VIEW PUBLIC."kjoptfra"(Animal_Id, Reason, kjonn,
OriginMarking) AS
SELECT
"Animal_Id",
"Reason",
BIRTHINFO."Gender",
ANIMAL."OriginMarking"
FROM PUBLIC."AnimalHistory"
INNER JOIN PUBLIC."BirthInfo"
ON 1=1
INNER JOIN PUBLIC."Animal"
ON 1=1
WHERE (BIRTHINFO."Gender" = 'Female')
AND ((ANIMAL."Id" = BIRTHINFO."Id")
AND (("Reason" IN('InFromUncontrolledHerd_2', 'InFromOwnHerd_1'))
AND ("Animal_Id" = ANIMAL."Id"))) [42122-191]
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.