Thanks for checking Evgenij. I was mistaken - adding "YEAR" to the
"NON_KEYWORDS" does indeed work. There was a different issue on my end that was
throwing things off. Appreciate everyone's help.
Best,Peter
On Saturday, February 17, 2024 at 02:19:07 AM EST, Evgenij Ryazanov
wrote:
He
Hello!
YEAR is a reserved word even in archaic SQL-92, so it was a bad idea to use
it as unquoted identifier. BTW, DATE and TRANSACTION are reserved words
too, but H2 allows their usage as identifiers. Also there is no YEAR
function in the Standard, correct syntax is EXTRACT(YEAR FROM someValue
Please discuss with the H2 developers first.
My understanding is: the current trend goes to SQL:2016 compliance and
the Compatibility modes are more or less seen as a tolerated legacy. So
any extension of those modes may not be welcome unconditionally, when
it introduced complexity or maintenance i
Thank you. I get it. Compatibility mode with PostgreSQL is incomplete and
certain regressions are to be expected when jumping major versions.
I would be willing to help patch the sw. Whether I would succeed is another
matter :-)
I'll pull the source and start a new thread as needed.
Many thanks
On Sat, 2024-02-17 at 08:09 +0700, Andreas Reichel wrote:
> Quoting transaction didn't have any effect.
Try again on MS SQL Server 😄
--
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 i
Greetings!
On Sat, 2024-02-17 at 00:47 +, 'Peter Borissow' via H2 Database
wrote:
>
> Hi Andreas,
> Â Â Thanks for the quick reply! As you suggest, quoting "year" as the
> alias works. Quoting transaction didn't have any effect. Several
> questions:
>
> (1) What doesn't this work?
> properties.
Hi Andreas,  Thanks for the quick reply! As you suggest, quoting "year" as
the alias works. Quoting transaction didn't have any effect. Several questions:
(1) What doesn't this work?
properties.setProperty("NON_KEYWORDS", "YEAR");
(2) I am in PostgreSQL mode. On a PostgreSQL server, I don't have
Good Morning.
`YEAR` is a SQL:2016 reserved
keyword:Â
http://www.h2database.com/html/advanced.html?highlight=keyword&search=keyword#keywords
You will need to quote your alias:
SELECT Year( date ) AS "YEAR"
FROM "transaction"
;
Similar thing for `TRANSACTION`.
It is always advisable to avoid such
Dear H2 Community,   I ran into an unexpected error today migrating from 1.x
to 2.x. I'm using H2Â 2.2.224 in PostgreSQL mode using the following parameters
properties.setProperty("MODE", "PostgreSQL");
properties.setProperty("DATABASE_TO_LOWER", "TRUE");
properties.setProperty("DEFAULT_NULL_ORDER