cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2116
Views
20
Helpful
3
Replies

Anyone have sql command for returning external phone mask with DN & Description of Phone

sandreone_2
Level 1
Level 1

Hi there,

Does anyone have full sql which will return the DN, External Phone Mask, and Description of Phone?  I get close with the sql command below, but still cannot get the description to appear.

admin:run sql select dnorpattern, e164mask, tkpatternusage from devicenumplanmap  inner join numplan on fknumplan=numplan.pkid where e164mask= "1234567890"

Thanks in advance,

Sharon

1 Accepted Solution

Accepted Solutions

Hi

You were 80% there:

run sql select dnorpattern, d.description, e164mask, tkpatternusage from devicenumplanmap  inner join numplan on fknumplan=numplan.pkid  join device d on fkdevice = d.pkid

Regards

Aaron Harrison

Principal Engineer at Logicalis UK

Please rate helpful posts...

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

View solution in original post

3 Replies 3

testeven
Cisco Employee
Cisco Employee

Hi Sharon,

I believe you need to add a union command, something like this:

admin: run sql select dnorpattern from numplan union select description from device

Regards,

Tere.

If you find this post helpful, please rate!

Regards, Tere. If you find this post helpful, please rate! :)

Hi

You were 80% there:

run sql select dnorpattern, d.description, e164mask, tkpatternusage from devicenumplanmap  inner join numplan on fknumplan=numplan.pkid  join device d on fkdevice = d.pkid

Regards

Aaron Harrison

Principal Engineer at Logicalis UK

Please rate helpful posts...

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Aaron,

Thanks so much for your feedback.  It worked great.  Here's the sql command used since I was looking for a particular number.

run sql select dnorpattern, d.description, e164mask, tkpatternusage from devicenumplanmap  inner join numplan on fknumplan=numplan.pkid  join device d on fkdevice = d.pkid where e164mask= "1234567890" "NUMBER"

This saved me several hours in Call Mgr.

Thanks again,

Sharon

Getting Started

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: