This has been driving me crazy! It must be something simple.
Here is my code:
Select
logid,
row_date,
sum(acdcalls) as 'total calls',
sum(ti_stafftime) as 'total time staffed',
sum(acdtime) as 'time on the phone',
Case acdtime
When acdtime > 0 Then
sum(ti_stafftime/acdtime)
Else '0'
End as MyPercent,
RepLName+', '+RepFName AS Agent,
SupLName+', '+SupFName AS Sup,
MgrLName+', '+MgrFName AS Manager
And I am getting the error message
Incorrect syntax near '>'.
What am I doing wrong here?