<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CUCM SQL Query to Update External Phone Number Mask of Device Pool in IP Telephony and Phones</title>
    <link>https://community.cisco.com/t5/ip-telephony-and-phones/cucm-sql-query-to-update-external-phone-number-mask-of-device/m-p/3336897#M358353</link>
    <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to run a Update SQL query for an entire Device Pool which consist of about 80 devices in total.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can easily update the e164mask for all of the devices or for an specific Directory Number or range of Directory Numbers.&lt;/P&gt;
&lt;P&gt;My problem is associating the devicenumplanmap table with the devicepool table in the Update query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tested multiple SQL queries with no luck. Here are some of the ones I have put together from the help of other discussion from the Cisco Support Community and ran in my lab.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;run sql update devicenumplanmap set e164mask = '89898989' where (fkdevice in (select pkid from device where (fkdevicepool in (select pkid from devicepool where name = 'ORPDXMAN')))&lt;/P&gt;
&lt;P&gt;A syntax error has occurred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;run sql update devicenumplanmap set e164mask = '89898989' where devicenumplanmap.fkdevice = device.pkid and device.fkdevicepool = devicepool.pkid and devicepool.name = 'ORPDXMAN'&lt;/P&gt;
&lt;P&gt;Column (device) not found in any table in the query (or SLV is undefined).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;run sql update devicenumplanmap set e164mask = '8989898' where inner join device.fkdevicepool = devicepool.pkid on device.pkid = devicenumplanmap.fkdevice and devicepool.name = "ORPDXMAN'&lt;/P&gt;
&lt;P&gt;A syntax error has occurred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am pretty sure my 3rd query is not even close to it been correct. My 1st query is the one I feel I am the closest to getting the result that I need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is always appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 17 Mar 2019 19:16:50 GMT</pubDate>
    <dc:creator>Guzmanjl</dc:creator>
    <dc:date>2019-03-17T19:16:50Z</dc:date>
    <item>
      <title>CUCM SQL Query to Update External Phone Number Mask of Device Pool</title>
      <link>https://community.cisco.com/t5/ip-telephony-and-phones/cucm-sql-query-to-update-external-phone-number-mask-of-device/m-p/3336897#M358353</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to run a Update SQL query for an entire Device Pool which consist of about 80 devices in total.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can easily update the e164mask for all of the devices or for an specific Directory Number or range of Directory Numbers.&lt;/P&gt;
&lt;P&gt;My problem is associating the devicenumplanmap table with the devicepool table in the Update query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tested multiple SQL queries with no luck. Here are some of the ones I have put together from the help of other discussion from the Cisco Support Community and ran in my lab.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;run sql update devicenumplanmap set e164mask = '89898989' where (fkdevice in (select pkid from device where (fkdevicepool in (select pkid from devicepool where name = 'ORPDXMAN')))&lt;/P&gt;
&lt;P&gt;A syntax error has occurred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;run sql update devicenumplanmap set e164mask = '89898989' where devicenumplanmap.fkdevice = device.pkid and device.fkdevicepool = devicepool.pkid and devicepool.name = 'ORPDXMAN'&lt;/P&gt;
&lt;P&gt;Column (device) not found in any table in the query (or SLV is undefined).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;run sql update devicenumplanmap set e164mask = '8989898' where inner join device.fkdevicepool = devicepool.pkid on device.pkid = devicenumplanmap.fkdevice and devicepool.name = "ORPDXMAN'&lt;/P&gt;
&lt;P&gt;A syntax error has occurred.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am pretty sure my 3rd query is not even close to it been correct. My 1st query is the one I feel I am the closest to getting the result that I need.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is always appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2019 19:16:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/ip-telephony-and-phones/cucm-sql-query-to-update-external-phone-number-mask-of-device/m-p/3336897#M358353</guid>
      <dc:creator>Guzmanjl</dc:creator>
      <dc:date>2019-03-17T19:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM SQL Query to Update External Phone Number Mask of Device Pool</title>
      <link>https://community.cisco.com/t5/ip-telephony-and-phones/cucm-sql-query-to-update-external-phone-number-mask-of-device/m-p/3336901#M358354</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Haha wow, this is what happens when you stare at something too long. I was only missing a close bracket ) at the end of my first query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;run sql update devicenumplanmap set e164mask = '89898989' where (fkdevice in (select pkid from device where (fkdevicepool in (select pkid from devicepool where name = 'ORPDXMAN')))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Needs 4 )))) at the end.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 20:32:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/ip-telephony-and-phones/cucm-sql-query-to-update-external-phone-number-mask-of-device/m-p/3336901#M358354</guid>
      <dc:creator>Guzmanjl</dc:creator>
      <dc:date>2018-02-23T20:32:03Z</dc:date>
    </item>
  </channel>
</rss>

