05-07-2015 10:01 AM - edited 03-17-2019 02:55 AM
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
05-07-2015 11:53 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide