sql 2008 query. I am trying to correct this error message

Posted by getbruce on Stack Overflow See other posts from Stack Overflow or by getbruce
Published on 2010-06-15T04:06:01Z Indexed on 2010/06/15 4:12 UTC
Read the original article Hit count: 115

Filed under:

What is wrong with this code? What would be the correct syntax?

SELECT EmployeeID, SUM('More than 2 orders') FROM Orders WHERE EmployeeID >2 GROUP BY EmployeeID

Msg 8117, Level 16, State 1, Line 1 Operand data type varchar is invalid for sum operator.

© Stack Overflow or respective owner

Related posts about sql-server