Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sql2020
Yak Posting Veteran
54 Posts |
Posted - 2010-10-29 : 07:52:17
|
| select Modified_Date,Request_Id,Short_Description,Company,Service_Categorization_Tier_1,Service_Categorization_Tier_2,Service_Categorization_Tier_3,Support_Company,Support_Organization,Support_Group,Name,Part_of_Custom_Group,Component,Interface_name from MER_CGI_Middleware_Error_Confi where error_type like 'Serveur Down' --and Interface_name like 'People Interface' group by Interface_nameit shows this errorMsg 8120, Level 16, State 1, Line 2Column 'MER_CGI_Middleware_Error_Confi.Modified_Date' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.help on thissql2020 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-29 : 08:09:21
|
http://weblogs.sqlteam.com/jeffs/archive/2007/07/20/but-why-must-that-column-be-contained-in-an-aggregate.aspx No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2010-10-29 : 08:14:33
|
| i dont understand what ur trying to get i suppose, u want to get the distinct of rows try include all columns of select in group by clause |
 |
|
|
sql2020
Yak Posting Veteran
54 Posts |
Posted - 2010-10-29 : 08:27:47
|
| Not distincti want max(date) with in that groupsql2020 |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2010-10-29 : 09:04:24
|
| select MAX(date)) over( partition by Interface_name),* from Schedulewhere error_type like 'Serveur Down' try this |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-29 : 09:24:05
|
Don't use LIKE when not using jokers. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|
|
|