Vlad Drumea solves a challenge:
Why wouldn’t you be able to change the query?
The two most common scenarios I’ve ran into are:
- the software vendor does not want to change the code
- a legacy application that’s no longer maintained and nobody has access to the code base
Read on for Vlad’s solution to a fairly common problem. The real fix, of course, is to use NVARCHAR everywhere and not have to worry about VARCHAR to NVARCHAR conversion. The secondary fix is to get your queries right and make sure your data types are consistent.