各位好
- select empPhoto.ImageData,upduser, count(upduser) as totalView from efview left join empPhoto on empPhoto.emp_id = efview.upduser where docid = '1' and version ='1.00' group by efview.updUser
Msg 8120, Level 16, State 1, Line 1
Column 'empPhoto.ImageData' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
可是拿掉empPhoto.ImageData就没事了,但是我非常需要这个field。不太清楚group by的用法,参考网上的资料还是没头绪。
请高手指点。



