10-06-2009 06:28 AM - edited 03-15-2019 07:55 PM
Hello, I'm trying to write a query against CUCM6.1.2 that will give me all calls made to an extension for an inclusive range of dates. I want to say give me all calls made to extension "Z" for an example between September 9th and October 1st.
Here is what I was thinking would do it but it didn't and I've tried a bunch of things with no success:
run sql select callingpartynumber, originalcalledpartynumber, finalcalledpartynumber, duration, datetimestamporigination, datetimestampdisconnect from car:tbl_billing_data where datetimestamporigination > '2009-09-10' and finalcalledpartynumber IN ('3321')
Thanks in advance.
John
10-06-2009 08:00 AM
John,
You can certainly use the syntax
SELECT * FROM db_table
WHERE date >= "1-SEP-2009"
AND date <= "5-SEP-2009" as an example.
I usually use the BETWEEN command
SELECT * FROM db_table
WHERE date BETWEEN "1-SEP-2009"
AND "5-SEP-2009"
10-06-2009 11:15 AM
Thanks for the response, I tried what you listed and it didn't work. I tried modifying the syntax based on known working query's but still not having any luck. I'll keep on trying. Thanks again for helping.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: