cancel
Showing results for
Did you mean:

Highlighted
05 Base Camper

## I am trying to create a report from AV_CDRs why dose this not work (DIALNUM > "17999" AND DIALNUM <

I am creating a report to collect calls to a group of Stations

(DIALNUM > "17999" AND DIALNUM < "18099")  and this statement does not work I get this back.  18004566760 much greater than 18099 the really confusing thing is that this statement does work  (CALLNUM > "17999" AND CALLNUM < "18099")

DIALNUM

18004566760
18015602561
18062020652
18007773300
13100
18090
18009229226
18087

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Expert

## Re: I am trying to create a report from AV_CDRs why dose this not work (DIALNUM > "17999&am

as Scott mentioned, you can use a regex to filter on extension range. In this case, you are only interested in 180xx numbers, so I'd say following should work for you:

DIALNUM MATCHES REGEX "^180\d{2}\$"

it should match DIALNUM that starts with 180 followed by exactly 2 digits. The ^ and \$ are for begins with and ends with respectively. Let me know if that works.

If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
2 REPLIES 2
Highlighted
Sage

## Re: I am trying to create a report from AV_CDRs why dose this not work (DIALNUM > "17999&qu

Hello Steven,

The DIALNUM field in the AVCDR record is a "String" type field, not a "Numeric" type field. This prevents using arithmetic operators such as ">", "<" for this field.

The Where Clause would need to specifically name each extension.
Example: ( DIALNUM = "17999" OR DIALNUM = "18000" OR DIALNUM = "18001" OR DIALNUM = "18002" OR DIALNUM = "18003" OR ... )

Another option would be to use a Regular Expression(s) in the Where Clause. The Prognosis Online Help reference for Regular Expression use in Where Clauses is: Using Regular Expressions in a Where Clause.

Thank you,
Scott Baldwin

Highlighted
Expert

## Re: I am trying to create a report from AV_CDRs why dose this not work (DIALNUM > "17999&am

as Scott mentioned, you can use a regex to filter on extension range. In this case, you are only interested in 180xx numbers, so I'd say following should work for you:

DIALNUM MATCHES REGEX "^180\d{2}\$"

it should match DIALNUM that starts with 180 followed by exactly 2 digits. The ^ and \$ are for begins with and ends with respectively. Let me know if that works.

If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Top Liked Members