<?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 support calling Functions in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74509#M6090</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Does the ArcSDESQLExecute class support calling Oracle functions?&amp;nbsp; If yes, does it further support the return of a ref_cursor?&amp;nbsp; I've tried &lt;BR /&gt;&lt;BR /&gt;sql = "call BlahFunction()"&lt;BR /&gt;sdeReturn = conn.execute(sql)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure if this is supported.&amp;nbsp; We are implementing the cx_Oracle library for all of our attribute queries and other data processing (it's then utilized with arcpy in one form or another).&amp;nbsp; It is a bit of a pain to get the field mapping done, but it has been an overall great way to integrate non-spatial data stored in Oracle db's.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is an example of calling a function (we are not doing this yet.&amp;nbsp; We simply construct and pass in complete SQL statements to build cx_oracle cursor objects).&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/8048124/cx-oracle-can-callfunc-return-list"&gt;http://stackoverflow.com/questions/8048124/cx-oracle-can-callfunc-return-list&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 May 2013 11:03:15 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2013-05-23T11:03:15Z</dc:date>
    <item>
      <title>ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74508#M6089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does the ArcSDESQLExecute class support calling Oracle functions?&amp;nbsp; If yes, does it further support the return of a ref_cursor?&amp;nbsp; I've tried &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sql = "call BlahFunction()"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sdeReturn = conn.execute(sql)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 08:30:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74508#M6089</guid>
      <dc:creator>CharlesTilly</dc:creator>
      <dc:date>2013-05-23T08:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74509#M6090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Does the ArcSDESQLExecute class support calling Oracle functions?&amp;nbsp; If yes, does it further support the return of a ref_cursor?&amp;nbsp; I've tried &lt;BR /&gt;&lt;BR /&gt;sql = "call BlahFunction()"&lt;BR /&gt;sdeReturn = conn.execute(sql)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure if this is supported.&amp;nbsp; We are implementing the cx_Oracle library for all of our attribute queries and other data processing (it's then utilized with arcpy in one form or another).&amp;nbsp; It is a bit of a pain to get the field mapping done, but it has been an overall great way to integrate non-spatial data stored in Oracle db's.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is an example of calling a function (we are not doing this yet.&amp;nbsp; We simply construct and pass in complete SQL statements to build cx_oracle cursor objects).&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/8048124/cx-oracle-can-callfunc-return-list"&gt;http://stackoverflow.com/questions/8048124/cx-oracle-can-callfunc-return-list&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 11:03:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74509#M6090</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-05-23T11:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74510#M6091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;According to this 10.0 Help page, it seems to be returning either a List object in case of SQL SELECT statement, or a Boolean for fail/success when running a schema changing SQL query (DDL), or UPDATE / INSERT statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000057000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v00000057000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also see this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://developmentfaction.blogspot.nl/2010/07/python-tip-using-arcsdesqlexecute-to.html"&gt;http://developmentfaction.blogspot.nl/2010/07/python-tip-using-arcsdesqlexecute-to.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 11:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74510#M6091</guid>
      <dc:creator>MarcoBoeringa</dc:creator>
      <dc:date>2013-05-23T11:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74511#M6092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the replies.&amp;nbsp; I'm aware of the options you have suggested but I really need to invoke a function because one of the parameters needs to be a clob.&amp;nbsp; I could use the cx_Oracle module but then I get back a non-ESRI cursor that I then have to convert.&amp;nbsp; Ordinarily not a big deal but I have to do this a lot on a lot of data and in the interest of performance and maintenance.&amp;nbsp; I see v.10.1 has expanded the arcpy.da module with functionality that may do the trick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 18:24:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74511#M6092</guid>
      <dc:creator>CharlesTilly</dc:creator>
      <dc:date>2013-05-23T18:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74512#M6093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the replies.&amp;nbsp; I'm aware of the options you have suggested but I really need to invoke a function because one of the parameters needs to be a clob.&amp;nbsp; I could use the cx_Oracle module but then I get back a non-ESRI cursor that I then have to convert.&amp;nbsp; Ordinarily not a big deal but I have to do this a lot on a lot of data and in the interest of performance and maintenance.&amp;nbsp; I see v.10.1 has expanded the arcpy.da module with functionality that may do the trick.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to throw this out there, what about NumPyArrayToTable?&amp;nbsp; Wondering if you just add the cx_Oracle cursor (from the result of your function call) into an array then let the method do the work -- rather than doing all the gymnastics to get the field mapping done.&amp;nbsp; Not sure but I may have to look into this myself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000016000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000016000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 18:49:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74512#M6093</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-05-23T18:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74513#M6094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah yes, one of those new 10.1 arcpy.da features I was referring to.&amp;nbsp; However, I need a v.10 solution.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But your idea is a good one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 19:20:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74513#M6094</guid>
      <dc:creator>CharlesTilly</dc:creator>
      <dc:date>2013-05-23T19:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcSDESQLExecute support calling Functions</title>
      <link>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74514#M6095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ah yes, one of those new 10.1 arcpy.da features I was referring to.&amp;nbsp; However, I need a v.10 solution.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;But your idea is a good one. &lt;BR /&gt;&lt;BR /&gt;Regards&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;doh! bummer!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 19:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcsdesqlexecute-support-calling-functions/m-p/74514#M6095</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-05-23T19:21:58Z</dc:date>
    </item>
  </channel>
</rss>

