<?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 Re: Get PKID of inserted row in Management</title>
    <link>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429511#M184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi GTG,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Here is a snip of SQL to get the PKID of a phone. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;select pkid from device where name='SEP000000111111'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;This will return the PKID, or UUID, of the phone with MAC address 000000111111&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;Download&amp;nbsp; yourself a copy of the data dictionary for whichever version of Communications Manager you are working with. &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; If you have access to the COmmunications Manager console directly or through an SSH&amp;nbsp; client you can run sql commands and see the returned values from there&amp;nbsp; before writing them into your code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;In the command line the query would look something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;run sql select PKID from device where name = "SEP000000111111"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Reference - &lt;A href="https://community.cisco.com/docs/DOC-44771"&gt;Finding UUID for CUCM Objects&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Geevarghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Apr 2014 12:42:43 GMT</pubDate>
    <dc:creator>Geevarghese Cheria</dc:creator>
    <dc:date>2014-04-08T12:42:43Z</dc:date>
    <item>
      <title>Get PKID of inserted row</title>
      <link>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429510#M183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When inserting a row via AXL SQL, is there a way to get the PKID of the newly inserted row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GTG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 08:16:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429510#M183</guid>
      <dc:creator>Gordon Ross</dc:creator>
      <dc:date>2014-04-03T08:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get PKID of inserted row</title>
      <link>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429511#M184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi GTG,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Here is a snip of SQL to get the PKID of a phone. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;select pkid from device where name='SEP000000111111'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;This will return the PKID, or UUID, of the phone with MAC address 000000111111&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;Download&amp;nbsp; yourself a copy of the data dictionary for whichever version of Communications Manager you are working with. &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; If you have access to the COmmunications Manager console directly or through an SSH&amp;nbsp; client you can run sql commands and see the returned values from there&amp;nbsp; before writing them into your code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;In the command line the query would look something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #000000;"&gt;run sql select PKID from device where name = "SEP000000111111"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Reference - &lt;A href="https://community.cisco.com/docs/DOC-44771"&gt;Finding UUID for CUCM Objects&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Geevarghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 12:42:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429511#M184</guid>
      <dc:creator>Geevarghese Cheria</dc:creator>
      <dc:date>2014-04-08T12:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get PKID of inserted row</title>
      <link>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429512#M185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know how to do that, and I do have the CallManager Data Dictionary by my side - all 1,000 pages of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some databases, you can do a "INSERT INTO table (columns) VALUES (....) RETURNING pkid" and the insert command would give you the pkid of the just inserted row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping to avoid the round-trip of issuing an INSERT, then having to do a separate SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GTG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 13:06:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429512#M185</guid>
      <dc:creator>Gordon Ross</dc:creator>
      <dc:date>2014-04-08T13:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get PKID of inserted row</title>
      <link>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429513#M186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at this sample SQL query, you should be able to get the pkid using newid() function.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;SOAP-ENV:Body&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;lt;axlapi:executeSQLUpdate sequence="1" xmlns:axlapi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.cisco.com/AXL/API/7.0" rel="nofollow" target="_blank"&gt;http://www.cisco.com/AXL/API/7.0&lt;/A&gt;&lt;SPAN&gt;" xmlns:axl="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.cisco.com/AXL/7.0" rel="nofollow" target="_blank"&gt;http://www.cisco.com/AXL/7.0&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" xsi:schemaLocation="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.cisco.com/AXL/API/7.0" rel="nofollow" target="_blank"&gt;http://www.cisco.com/AXL/API/7.0&lt;/A&gt;&lt;SPAN&gt; axlsoap.xsd"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;sql&amp;gt;&lt;/P&gt;
&lt;P&gt;insert into device (fkPhoneTemplate,fkDevicePool,tkclass, tkpreemption, tkdeviceprofile, tkmodel, tkdeviceprotocol, tkproduct, description, tkstatus_mlppindicationstatus, name, pkid) values ('Standard 7941 SCCP','default',1, 2, 2, 115, 0, 115, '', 0, 'Cisco 7941', &lt;STRONG&gt;newid()&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;&amp;lt;/sql&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/axlapi:executeSQLUpdate&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/SOAP-ENV:Body&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Howard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 20:50:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/get-pkid-of-inserted-row/m-p/3429513#M186</guid>
      <dc:creator>tinghche</dc:creator>
      <dc:date>2014-04-09T20:50:10Z</dc:date>
    </item>
  </channel>
</rss>

