I know I can convert the variables to nvarchar(max) first and then compare with the = or <> operators. But is this the right way?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, I think that’s the best way to go – short of actually converting your NTEXT columns to NVARCHAR(MAX).
NVARCHAR(MAX) is much easier to work with than NTEXT, since it supports all the string functions that SQL Server has.
NTEXT will be phased out some time soon – try to switch to NVARCHAR(MAX) as soon as possible. You won’t loose anything and only gain additional useful capabilities.
Marc