cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
295
Views
0
Helpful
1
Replies

SQL in CUCM

Hi Everyone,

Consider me as a start up person in sql section in CUCM as I wanna know how to run sql for list of directory numbers whose description are marked by specific name:

as I tried with

run sql select dnoprattern,description from numplan where description like '%name of DN description' and I am not able to get the list of DN which I supposed to get completely.

and I tried with

 

run sql select dnorpattern,description from numplan n inner join dnplanmap as dmap on dmap.fkn=n.pkid inner join numplan as n on dnorpattern.fkn=dmap.pkid where description like '%name of DN description' but resulted with "A syntax error has occurred."

 

Kindly help me how to run the correct format.

 

Thanks & Regards,

Saif

1 Reply 1

Aditya Gupta
Cisco Employee
Cisco Employee

Hi

 

The first query you ran seems to be correct. Maybe you are not using it the way it should be.

 

Let me give u an example :

 

Scenario 1:

 

I want to find any dn whose description ends with word "test", then query will be:

run sql select dnoprattern,description from numplan where description like '%test'

 

Scenario 2:

 

I want to find any dn whose description begins with word "test", then query will be:

run sql select dnoprattern,description from numplan where description like 'test%'

 

Scenario 3:

 

I want to find any dn whose description has a word "test" inbetween, then query will be:

run sql select dnoprattern,description from numplan where description like '%test%'

 

Hope this helps.

Aditya

run sql select dnoprattern,description from numplan where description like '%name of DN description' - See more at: https://supportforums.cisco.com/discussion/12501361/sql-cucm#sthash.rIhXIUb8.dpuf
run sql select dnoprattern,description from numplan where description like '%name of DN description' - See more at: https://supportforums.cisco.com/discussion/12501361/sql-cucm#sthash.rIhXIUb8.dpuf
un sql select dnoprattern,description from numplan where description like '%name of DN description' - See more at: https://supportforums.cisco.com/discussion/12501361/sql-cucm#sthash.rIhXIUb8.dpuf