email belongs to table booking and its defined as type "Text" in our Microsoft sql server
SELECT email,
COUNT(email) AS NumOccurrences
FROM Booking
GROUP BY email
HAVING ( COUNT(email) > 1 )
after running the above query(trying to find duplicates emails in the booking) I got the error message like this:
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
I am using Microsoft Sql
text
for emails? "ntext , text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types" msdn.microsoft.com/en-us/library/ms187993.aspx You cannot group bytext
: "Columns of type text, ntext, and image cannot be used in group_by_expression" msdn.microsoft.com/en-us/library/ms177673.aspx