<?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 Most efficient way of updating shape on SQL server table in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/most-efficient-way-of-updating-shape-on-sql-server/m-p/110925#M6302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a process that creates a polyline shape one at a time.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each polyline, depending on associated keys, I need to update the shape on either table A matching on the keys or table B matching on the keys.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie I have the polyline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if key 1 and key 2 are populated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update the shape on a row on table A matching on key1, key2, plus 2 other keys (key3 and key4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update the shape on a row on table B matching on key3 and key4&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is I cannot work out whether it is best to get layers of table A and B up front (many thousand of rows) and somehow filter before updating or should I get these one at a time. Also, what would the actual shape update command be as I have not yet written code to update a shape on an existing SQL server table row?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There may be many polyline shapes to process.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realise this is vague but any ideas about how I should do this would be appreciated. It needs to be as efficient as possible.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe someone has already done something similar and has code examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2014 08:44:36 GMT</pubDate>
    <dc:creator>MarkWingfield</dc:creator>
    <dc:date>2014-08-19T08:44:36Z</dc:date>
    <item>
      <title>Most efficient way of updating shape on SQL server table</title>
      <link>https://community.esri.com/t5/data-management-questions/most-efficient-way-of-updating-shape-on-sql-server/m-p/110925#M6302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a process that creates a polyline shape one at a time.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each polyline, depending on associated keys, I need to update the shape on either table A matching on the keys or table B matching on the keys.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ie I have the polyline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if key 1 and key 2 are populated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update the shape on a row on table A matching on key1, key2, plus 2 other keys (key3 and key4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; update the shape on a row on table B matching on key3 and key4&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is I cannot work out whether it is best to get layers of table A and B up front (many thousand of rows) and somehow filter before updating or should I get these one at a time. Also, what would the actual shape update command be as I have not yet written code to update a shape on an existing SQL server table row?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There may be many polyline shapes to process.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realise this is vague but any ideas about how I should do this would be appreciated. It needs to be as efficient as possible.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe someone has already done something similar and has code examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 08:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/most-efficient-way-of-updating-shape-on-sql-server/m-p/110925#M6302</guid>
      <dc:creator>MarkWingfield</dc:creator>
      <dc:date>2014-08-19T08:44:36Z</dc:date>
    </item>
  </channel>
</rss>

