SELECT
Reference_Number,
c.First_Name + ' ' + c.Last_Name AS 'Customer_Name',
Staff_FirstName + ' ' + Staff_LastName AS 'Staff_Name',
Date_Time, Summary, OtherDetails,
CAST(Hold_Time AS TIME(0)) AS 'HoldTime',
CAST(Duration AS TIME(0)) AS 'Duration',
Call_Status
FROM
Support_Call AS tc
INNER JOIN
customer AS c ON c.CustomerID = c.CustomerID
INNER JOIN
staff AS s ON tc.StaffID = s.StaffID
WHERE
Call_Status LIKE 'Pending%'
ORDER BY
Date_Time DESC;
I'm trying to calculate all details of calls that are pending but I'm getting an error. Reference_number
is of INT
data type