Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grouping issue
Message
From
11/06/2003 23:52:52
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00799203
Message ID:
00799227
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform