like operator problem while upgrading from sql server 2000 to 2005
Dear all,
we have a query like this
select * form clients where clientname like '%search%'
please note that clientname column is nvarchar(200)
some of the clients names rows are stored in arabic and some in english
this query used to work well when running on sql server 2000 for both arabic and english search words
when we moved the same database to sqlserver 2005
only the queries with '%search%' in english returns results , if we try to search an arabic word or any arabic letter it doesnt return any rows.
how can we solve this ? any ideas why is this happening ???
it is supposed to be unicode column right ?
thx in advance
Re: like operator problem while upgrading from sql server 2000 to 2005
Re: like operator problem while upgrading from sql server 2000 to 2005
The string value '%search%' is not unicode, for that you need to precede it with an N, eg:
Code:
select * form clients where clientname like N'%search%'