Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grouping issue
Message
De
11/06/2003 23:52:52
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00799203
Message ID:
00799227
Vues:
31
Sergey:

Oops! Time I put my head in a bucket of ice water! I wrote 'row' when I meant 'column' (Maybe that Preview button is for thinking about what you have written <g>)

Using your most recent suggestion I sent the query
SELECT t1.* FROM Ppgval t1
  WHERE EXISTS ( SELECT * FROM Ppgval t2
               WHERE t1.node = t2.node And t1.rollno = t2.rollno
                     AND t1.gvald = MAX(t2.gvald))
to SQL and got back the response:
Server: Msg 147, Level 16, State 1, Line 1
An aggregate may not appear in the WHERE clause unless it is in a subquery
contained in a HAVING clause or a select list, and the column being
aggregated is an outer reference.
It seems to me that both these options only work with a GROUP BY clause.

- g -
Godfrey Nicholson
Ofek Technologies Ltd
Auckland
New Zealand
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform