W ramach treningu sql'a robię sobie ćwiczenia proponowane na Wikipedii tutaj też jest podana tabela do zapytania: http://en.wikibooks.org/wiki/SQL_Exercises...#Sample_dataset
SELECT AVG(Price), Manufacturers.Name FROM Products INNER JOIN Manufacturers ON Products.Manufacturer = Manufacturers.Code GROUP BY Manufacturers.Name;
Używam ms sql server'a 2005 i wyrzuca takie info o błędzie:
Msg 306, Level 16, State 2, Line 1
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator