Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.
SELECT DATE(A.CALL_LOG_DT) AS CALLDATE, A.CALL_LOG_TIME, CASE LENGTH(RTRIM(A.CUSTOMER_ID)) WHEN 8 THEN '0000'||RTRIM(A.CUSTOMER_ID) WHEN 7 THEN '00000'||RTRIM(A.CUSTOMER_ID) WHEN 6 THEN '000000'||RTRIM(A.CUSTOMER_ID) WHEN 5 THEN '0000000'||RTRIM(A.CUSTOMER_ID) WHEN 4 THEN '00000000'||RTRIM(A.CUSTOMER_ID) WHEN 3 THEN '000000000'||RTRIM(A.CUSTOMER_ID) ELSE A.CUSTOMER_ID END AS CUSTOMER_ID, A.COMMTYPE_CD, A.REQ_AGT_CD, A.CLAIM_NO, A.POLICY_NO, A.REQ_TYP_CD, A.BASE_POLICY_NO, A.LOG_USER_ID, B.CLAIM_TYP_CD, B.CLOSE_DT, B.OPEN_DT, B.OPEN_IND FROM CALLDETAILS_CURRENT A LEFT JOIN CLAIMSTABLE B ON B.CLAIM_NO = A.CLAIM_NO AND B.BASE_POLICY_NO = A.BASE_POLICY_NO WHERE A.REQ_TYP_CD IN ('CU', 'PA','SR','BR') AND LEFT(A.LOG_USER_ID,3) IN ('C75', 'C80') AND DATE(A.CALL_LOG_DT) >= '10/01/2013';
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.