J
jinnys
Unregistered / Unconfirmed
GUEST, unregistred user!
就是一句sql语句 SqlStr:='select personID, personname, groupID, groupname, projectID, projectname, actionid, action, catsActionID, nonecatsaction, date, hours, remark from Maintable where projectname='''+ttprojectname+''' group by date';错误提示:“you tried to execute a query that does not include the specifed expression 'PersonId' as part of an aggregate function ”谢谢!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~procedure TForm1.BitBtn5Click(Sender: TObject);var SqlStr,ttprojectname:string;begin ttProjectName:=Edit3.Text; SqlStr:='select personID, personname, groupID, groupname, projectID, projectname, actionid, action, catsActionID, nonecatsaction, date, hours, remark from Maintable where projectname='''+ttprojectname+''' group by date'; DBQuery.Close; DBQuery.SQL.Clear; DBQuery.Sql.Add(sqlstr); DBQuery.Active:=true;end;