<?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: ArcSDESQLexecute error?? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96242#M7466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clive all the threads to the right in "more like this" seem to refer back to old threads of yours which were never resolved or you didn't respond to.&amp;nbsp; Did any of those suggestions work? If not, perhaps you can follow up with a response to Jake's suggestion to facilitate narrowing down what you tried and what the result was.&lt;/P&gt;&lt;P&gt;from the help &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/arcsdesqlexecute.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/arcsdesqlexecute.htm"&gt;ArcSDESQLExecute—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;there is no wildcard examples here or elsewhere&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2015 20:30:30 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2015-12-23T20:30:30Z</dc:date>
    <item>
      <title>ArcSDESQLexecute error??</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96240#M7464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get a basic sql statement working using arcpy.ArcSDESQLExecute, it keeps throwing an error.&lt;/P&gt;&lt;P&gt;I need to run an external sql&amp;nbsp; with joins, etc in .sql file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;##The code&lt;/P&gt;&lt;P&gt;import arcpy,sys,csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Python environment&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;workspace = arcpy.env.workspace = r"C:\database_connections\K2_Master_Training.sde"&lt;/P&gt;&lt;P&gt;sde_conn =&amp;nbsp; arcpy.ArcSDESQLExecute(r"C:\database_connections\K2_Master_Training.sde")&lt;/P&gt;&lt;P&gt;sql = "SELECT * FROM tbSite"&lt;/P&gt;&lt;P&gt;sqlresult = sde_conn.execute(sql)&lt;/P&gt;&lt;P&gt;for i in sqlresult:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the following error??&lt;/P&gt;&lt;P&gt;AttributeError: AttributeError(u'ArcSDESQLExecute: SreamBindOutputColumn ArcSDE Error -65 \uec5c',)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If would appreciate assistance getting this working, to read a sql file.&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;Clive&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 17:56:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96240#M7464</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2015-12-23T17:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLexecute error??</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96241#M7465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clive,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if you can execute wildcards with the ArcSDESQLExecute function.&amp;nbsp; Try specifying a field name in your sql statement and it should work.&amp;nbsp; Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="_jivemacro_uid_1450898249421620 jive_macro_code jive_text_macro" data-renderedposition="113_8_912_16" jivemacro_uid="_1450898249421620"&gt;&lt;P&gt;sql = "SELECT OBJECTID FROM tbSite"&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 19:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96241#M7465</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-12-23T19:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLexecute error??</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96242#M7466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clive all the threads to the right in "more like this" seem to refer back to old threads of yours which were never resolved or you didn't respond to.&amp;nbsp; Did any of those suggestions work? If not, perhaps you can follow up with a response to Jake's suggestion to facilitate narrowing down what you tried and what the result was.&lt;/P&gt;&lt;P&gt;from the help &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/arcsdesqlexecute.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/arcsdesqlexecute.htm"&gt;ArcSDESQLExecute—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;there is no wildcard examples here or elsewhere&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 20:30:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-error/m-p/96242#M7466</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-12-23T20:30:30Z</dc:date>
    </item>
  </channel>
</rss>

