In the following query, I get an error:
Msg 306, Level 16, State 2, Line 7
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
FYI, [Description] is Text, not null
s.Description AS Software
, SUM(d.Quantity) AS TotalQuantity
FROM tblSoftware s
INNER JOIN tblOrderDetails d
ON s.SoftwareID = d.SoftwareID
GROUP BY s.Description;
When I replace s.Description with s.SoftwareID in two places, it runs okay.
Question: Is Description seen as memo field? And that is why I am getting this error?
Can I somehow convert s.Description to string to make it run?
If not, the other choice I see is dump the result to a temp table with SoftwareID and then update a blank desciption field in the temp table.
Thanks for your comment in advance.