Click here to Skip to main content
15,898,374 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Table1 has nvarchar column called umsg which contains unicode text and some time english also.

I want to find out English text present in umsg column.

select * 
from table1 
where 
    RDate >='01/01/2014' and RDate < '09/26/2017' 
    and umsg = convert(varchar(max), umsg)


I used above query that work fine in regional language but some time fail. Suppose col contain text like 'ref no été' I think above message is unicode, if I used above query, it/sql is showing me as English not unicode.How to handle this.

What I have tried:

select * 
from table1 
where 
    RDate >='01/01/2014' and RDate < '09/26/2017' 
    and umsg = convert(varchar(max), umsg)
Posted
Updated 2-Oct-17 20:31pm

1 solution

Try this it's working ....
create table #test (
   uni nvarchar(100) 
)

insert into #test (uni) values (N'法的書面'),( 'asdf'), (N'Foo'), ('Bar')

select *
from #test
where uni <> convert(varchar(max), uni)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900