google-code-export / h2database

Automatically exported from code.google.com/p/h2database
0 stars 1 forks source link

H2 does not support SQL-92 "National Language" strings #240

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On many databases, to ensure that a string is sent through the database in 
Unicode, you need to prefix the string constant with a 'N' character. For 
example: http://support.microsoft.com/kb/239530

What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)
1. execute the statement :
  insert into AAA_AAAA0(A_NAME, A_OWNER, A_STATUS, A_LTIME) values ( ?, N' ', N' ', 0)

What is the expected output? What do you see instead?

Expected output is that it works, instead you get:

Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "INSERT 
INTO AAA_AAAA0(A_NAME, A_OWNER, A_STATUS, A_LTIME) VALUES ( ?, N' '[*], N' ', 
0) "; expected ")"; SQL statement:
insert into AAA_AAAA0(A_NAME, A_OWNER, A_STATUS, A_LTIME) values ( ?, N' ', N' 
', 0) [42001-144]

What version of the product are you using? On what operating system, file 
system, and virtual machine?

h2: 1.2.144
OS: MacOSX

Do you know a workaround?

No

How important/urgent is the problem for you?

This blocks the usage of H2 in our product, since all of the other databases do 
support this, and this assumption is baked into the product.

In your view, is this a defect or a feature request?

defect, since it doesn't support the SQL-92 spec.

Please provide any additional information below.

Original issue reported on code.google.com by pwagl...@gmail.com on 18 Oct 2010 at 8:46

GoogleCodeExporter commented 9 years ago
This will be fixed in the next release.
The change is committed in revision 3014.

Original comment by thomas.t...@gmail.com on 19 Oct 2010 at 7:00

GoogleCodeExporter commented 9 years ago
Many thanks for the quick fix!

Original comment by pwagl...@gmail.com on 19 Oct 2010 at 9:49

GoogleCodeExporter commented 9 years ago
Fixed in version 1.2.145.

Original comment by thomas.t...@gmail.com on 2 Nov 2010 at 7:28