Hi Everyone -
I am working on a bi-lingual site where I have to store both English and Non-English characters in a SQL Server 2008 database.
So far I have been able to enter non-english characters (data) and retrieve/display them the same way they were entered in my site.
However, I am facing a challenge when trying to perform search using like or even = operators.
I am passing the search string the same way I capture it for the save operation and performing the search in a stored procedure using the code below which returns everything instead of just the one I am looking for.
Can anyone please point me what I am missing here? The "NAME_AMHARIC" column is of type NVARCHAR.
Thanks in advance for your help!
ALTER PROCEDURE [dbo].[sp_search_products]
@NAME_AMHARIC nvarchar(200) = null
AS BEGIN
SELECT product_id,p.category_id,name,name_amharic
FROM products p
WHERE ltrim(rtrim(p.name_amharic)) = ltrim(rtrim(@NAME_amharic)) AND @NAME_AMHARIC is not null)
;
END