USE LCMReports
SELECT [CallOutcome]
      ,CASE(CallOutcome)
	  WHEN '0' THEN 'OUTCOME_SUCCESS'
      WHEN '1' THEN 'OUTCOME_ABANDONED'
      WHEN '2' THEN 'OUTCOME_INVALID'
      WHEN '3' THEN 'OUTCOME_BUSY'
      WHEN '4' THEN 'OUTCOME_CALLBACK'
      WHEN '5' THEN 'OUTCOME_DNC'
      WHEN '6' THEN 'OUTCOME_FAX'
      WHEN '7' THEN 'OUTCOME_MACHINE'
      WHEN '8' THEN 'OUTCOME_NOANS'
      WHEN '10' THEN 'OUTCOME_REJECTED'
      WHEN '11' THEN 'OUTCOME_WRONGPARTY'
      WHEN '12' THEN 'OUTCOME_NOTATTEMPTED'
      WHEN '13' THEN 'OUTCOME_DIALERROR'
      WHEN '14' THEN 'OUTCOME_NOTINSERVICE'
      WHEN '15' THEN 'OUTCOME_NOAGENTS'
      WHEN '16' THEN 'OUTCOME_NOAGENTSABAN'
      WHEN '17' THEN 'OUTCOME_RESERVEAGTFAIL'
      WHEN '18' THEN 'OUTCOME_AGTSKIPCALL'
      WHEN '19' THEN 'OUTCOME_AGTSKIPCLOSE'
      WHEN '20' THEN 'OUTCOME_CUSABANIVR'
      WHEN '21' THEN 'OUTCOME_TDBSWITCH'
      WHEN '24' THEN 'OUTCOME_RECORDFLUSHED'
      WHEN '25' THEN 'OUTCOME_LOWVOICECALL'
      ELSE 'UNKNOWN'
      END AS CallOutcomeString
      ,COUNT(*)AS COUNT
        FROM [LCMReports].[dbo].[RPT_CallActivity]
  WHERE CampaignGroup like '%ASU%'
  AND StartTime >= '2015-01-01 00:00:00'
  AND StartTime < '2015-01-29 23:59:59'
  AND LEN(CallOutcome) != '3'
  
GROUP BY CallOutcome
ORDER By CallOutcome
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies