<?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 Auto populate field data in one table using the reference of other table in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/auto-populate-field-data-in-one-table-using-the/m-p/171080#M13143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to auto populate field data in one table using the reference of other table.&amp;nbsp; I tried this using some sql scripting in arcpy. using the script I was able to pull the data from table but not modifying of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="comment token"&gt;# Use a connection file to create the connection&lt;/SPAN&gt;
egdb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\mlgsadmin\AppData\Roaming\ESRI\Desktop10.6\ArcCatalog\Connection to 10.72.15.186.sde'&lt;/SPAN&gt;
egdb_conn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcSDESQLExecute&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;egdb&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
table_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'SDE.BPPL_Overall_Status'&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Status'&lt;/SPAN&gt;
sql &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'''
UPDATE SDE.BPPL_Overall_Status
 SET BPPL_Overall_Status.Clearing = Cleraing_ROW_0_175_Km.STATUS
 from BPPL_Overall_Status
 Inner Join Cleraing_ROW_0_175_Km
 ON BPPL_Overall_Status.Start_mts=Cleraing_ROW_0_175_Km.Start_mts
'''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field_name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; table_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
egdb_return &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; egdb_conn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;execute&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sql&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was the script used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:51:59 GMT</pubDate>
    <dc:creator>yoganandhamgangadharan</dc:creator>
    <dc:date>2021-12-11T08:51:59Z</dc:date>
    <item>
      <title>Auto populate field data in one table using the reference of other table</title>
      <link>https://community.esri.com/t5/python-questions/auto-populate-field-data-in-one-table-using-the/m-p/171080#M13143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to auto populate field data in one table using the reference of other table.&amp;nbsp; I tried this using some sql scripting in arcpy. using the script I was able to pull the data from table but not modifying of the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="comment token"&gt;# Use a connection file to create the connection&lt;/SPAN&gt;
egdb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\mlgsadmin\AppData\Roaming\ESRI\Desktop10.6\ArcCatalog\Connection to 10.72.15.186.sde'&lt;/SPAN&gt;
egdb_conn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcSDESQLExecute&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;egdb&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
table_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'SDE.BPPL_Overall_Status'&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Status'&lt;/SPAN&gt;
sql &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'''
UPDATE SDE.BPPL_Overall_Status
 SET BPPL_Overall_Status.Clearing = Cleraing_ROW_0_175_Km.STATUS
 from BPPL_Overall_Status
 Inner Join Cleraing_ROW_0_175_Km
 ON BPPL_Overall_Status.Start_mts=Cleraing_ROW_0_175_Km.Start_mts
'''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field_name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; table_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
egdb_return &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; egdb_conn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;execute&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sql&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was the script used.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/auto-populate-field-data-in-one-table-using-the/m-p/171080#M13143</guid>
      <dc:creator>yoganandhamgangadharan</dc:creator>
      <dc:date>2021-12-11T08:51:59Z</dc:date>
    </item>
    <item>
      <title>Re:  Auto populate field data in one table using the reference of other table</title>
      <link>https://community.esri.com/t5/python-questions/auto-populate-field-data-in-one-table-using-the/m-p/171081#M13144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at how you are building the SQL statement, you define &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;table_name&lt;/SPAN&gt; and &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;field_name&lt;/SPAN&gt;, but neither of those variables are actually being used in the statement.&amp;nbsp; What do you want the final SQL statement to look like?&amp;nbsp; And if what you have is what you want, then what do you think is happening with &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;field_name&lt;/SPAN&gt; and&lt;SPAN style="font-family: courier new, courier, monospace;"&gt; table_name&lt;/SPAN&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 May 2019 16:17:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/auto-populate-field-data-in-one-table-using-the/m-p/171081#M13144</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-05-19T16:17:07Z</dc:date>
    </item>
  </channel>
</rss>

