Hi,

Yes, H2 converts LIKE 'a%' to BETWEEN 'a' AND 'b'. According to my
test this should work, as the Unicode character code for 王 is 29579,
and the code for 玌 is 29580. I wonder why it doesn't work for MS SQL
Server 2005. What happens if you run the query in MS SQL Server? What
happens if you only use name>=@P0 or only name<=@P1?

Regards,
Thomas


On Wed, Jun 22, 2011 at 4:52 AM, founder <[email protected]> wrote:
> I use h2-1.3.156.jar to test linked table of sqlserver 2005. when
> execute query: [select * from LINK_TABLE where Name like '王%'], it
> returns nothing. Then I use SQL Server Profiler, the SQL run in the
> database is: [exec sp_prepexec @p1 output,N'@P0 nvarchar(4000),@P1
> nvarchar(4000)',N'SELECT * FROM dbo.employee T WHERE name>=@P0 AND
> name<=@P1',N'王',N'玌'].
>
> I search the forum and found same problem in [http://groups.google.com/
> group/h2-database/browse_thread/thread/3c0167757fcbfc58/
> d8bdf38605e6b197?lnk=gst&q=like#d8bdf38605e6b197]
>
> --
> 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.
>
>

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