October 24, 2013 at 1:20 am
Hi,
I am getting the following error while executing the SP.
"Pivot grouping columns must be comparable. The type of column "Results" is "ntext", which is not comparable."
Is there any way to avoid this error? The datatype of column "Results" is "ntext" itself, as mentioned in the error message.
October 24, 2013 at 1:54 am
Use another data type instead of ntext?
Ntext is deprecated by the way.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 24, 2013 at 3:09 am
Ok,
What is the difference between varchar, nvarchar, and ntext?
Which datatype is the best suited to represent a string data?
October 24, 2013 at 3:19 am
char, varchar and text are all character strings.
char has a fixed length, while varchar has a varying length.
text is also varying length, but is used for blob storage. It is deprecated, so you better use varchar(max).
The same data types prefixed with n are the unicode equivalents.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 24, 2013 at 4:56 am
I avoided the error, achieved this way:
SELECT convert(nvarchar(max),LF.description) AS Results
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply