No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ-How to get data in a period of the bill in eSpace CC database

Publication Date:  2015-05-25 Views:  19 Downloads:  0
Issue Description

Sometimes , we need to get some data in a period from the database of eSpace CC .

Alarm Information

N/A

Handling Process

FIRST ,we should know that , the table name which store the bill is tbilllogxxx , for example for January , table name is tbilllog011,tbilllog012,tbilllog013 ,for April ,table name is tbilllog041 ,tbilllog042,tbilllog043 ,etc...


if we want a data that between 1st April ,and 5th April , we can use command:


select * from tbilllog041 where  CALLBEGIN between TO_DATE('2015-04-01','YYYY-MM-DD') and TO_DATE('2015-04-05','YYYY-MM-DD');

Root Cause

the time in the database need to be traslated to a correct format .

Solution

if we want a data that between 1st April ,and 5th April , we can use command:


select * from tbilllog041 where  CALLBEGIN between TO_DATE('2015-04-01','YYYY-MM-DD') and TO_DATE('2015-04-05','YYYY-MM-DD');


if we need the call that finished (some calls in the bill is not finished , it been transfer to other ivr or agent .) ,we can add  CALLIDNUM = -1

select * from tbilllog041 where  (CALLBEGIN between TO_DATE('2015-04-01','YYYY-MM-DD') and TO_DATE('2015-04-05','YYYY-MM-DD')) and CALLIDNUM = -1;


we can add called number as filter .for example ,we only want the bill that call to 123456 and 123455

select * from tbilllog041 where calleeno = any(9123455,9123456) and (CALLBEGIN between TO_DATE('2015-04-01','YYYY-MM-DD') and TO_DATE('2015-04-30','YYYY-MM-DD')) and CALLIDNUM = -1;


Suggestions

N/A

END