Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 重新设置sqlserver表的数据时出错_.net_Sql Server 2008_Grid - Fatal编程技术网

.net 重新设置sqlserver表的数据时出错

.net 重新设置sqlserver表的数据时出错,.net,sql-server-2008,grid,.net,Sql Server 2008,Grid,我想根据assignto column对列数据进行分组。但是否出现错误 我的问题是 从tn group by Assignto中选择*您不能按*分组。返回值必须在分组中或是聚合 my sql table data is column names & their datatypes are column name Datatype installation_id int(primarykey,identity(1,1)) Assignto

我想根据assignto column对列数据进行分组。但是否出现错误

我的问题是


从tn group by Assignto中选择*您不能按*分组。返回值必须在分组中或是聚合

my sql table data is 

column names & their datatypes are

column name           Datatype

installation_id        int(primarykey,identity(1,1))
Assignto               varchar 
customer_address       "
customer_contactno     "
package_details        "

1    ISP    N.G.O Colony    9841612124  Extended for 6 mnths
2    FE K.K Nagar   9865015695  expired
55  ISP02   aa          1234567890      aa
56  ISP02   asdf            0987654321      expired
57  ISP01   asdf        8907654321      Extended for 6 mnths
58  FE01    asdf        6789054321      expired
59  ISP02   asdf            5432109999      expired
60  DTo1    asdf            9999999999      expired

您希望得到什么结果?您希望查询中返回的其他列会发生什么情况?每一列必须在GROUP BY子句中指定,或包含在COUNT、SUM或MAX等聚合函数中
Select AssignTo, Count(*) From tn Group by assignto