Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Niepoprawne zapytanie grupujące
adas007
post
Post #1





Grupa: Zarejestrowani
Postów: 72
Pomógł: 0
Dołączył: 9.03.2007

Ostrzeżenie: (0%)
-----


Witajcie,
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
  1. SELECT AVG(Price), Manufacturers.Name
  2. FROM Products INNER JOIN Manufacturers
  3. ON Products.Manufacturer = Manufacturers.Code
  4. 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


Ten post edytował adas007 19.01.2010, 00:30:43
Go to the top of the page
+Quote Post
Gapollo
post
Post #2





Grupa: Zarejestrowani
Postów: 33
Pomógł: 5
Dołączył: 2.11.2006
Skąd: 52.259 °N, 21.020 °E

Ostrzeżenie: (0%)
-----


Zmień typ pola Manufacturers.Name na varchar. Tutaj typ Text służy do przechowywania książek (IMG:style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.12.2025 - 23:39