<?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: How to Call a mysql stored process into SAS Viya 3.5 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Call-a-mysql-stored-process-into-SAS-Viya-3-5/m-p/701776#M214918</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are mixing up two SQL Pass-Through techniques: SELECT FROM and EXECUTE. Using EXECUTE is the correct way to call a stored procedure. But running a SELECT on top of that in a single query is syntactically unsupported. In fact you are mixing DDL and DML statements. Getting a result set with EXECUTE is not supported.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A work-around would be to have the STP create a result set and query that table after calling the STP, effectively splitting up the SELECT and EXECUTE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-- Jan.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 09:11:50 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2020-11-26T09:11:50Z</dc:date>
    <item>
      <title>How to Call a mysql stored process into SAS Viya 3.5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Call-a-mysql-stored-process-into-SAS-Viya-3-5/m-p/701774#M214916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;How to call a sql stored procedure into SAS Viya 3.5?&lt;/P&gt;
&lt;P&gt;I am running below code but it is throwing error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;Connect to odbc (datasrc="****" &lt;BR /&gt;user ="*****" password = "*******" );&lt;BR /&gt;create table t as&lt;BR /&gt;select * from connection to odbc&lt;BR /&gt;Execute(dbo.stp) by odbc;&lt;BR /&gt;Disconnect from odbc;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;DIV class="sasSource"&gt;(Execute(dbo.stp)) by odbc;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;------- -&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;79 22&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;76&lt;/DIV&gt;
&lt;DIV id="sasLogError3_1606380816211" class="sasError"&gt;ERROR 79-322: Expecting a SELECT.&lt;/DIV&gt;
&lt;DIV id="sasLogError4_1606380816211" class="sasError"&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN,&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.&lt;/DIV&gt;
&lt;DIV id="sasLogError5_1606380816211" class="sasError"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 09:03:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Call-a-mysql-stored-process-into-SAS-Viya-3-5/m-p/701774#M214916</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2020-11-26T09:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Call a mysql stored process into SAS Viya 3.5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Call-a-mysql-stored-process-into-SAS-Viya-3-5/m-p/701776#M214918</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are mixing up two SQL Pass-Through techniques: SELECT FROM and EXECUTE. Using EXECUTE is the correct way to call a stored procedure. But running a SELECT on top of that in a single query is syntactically unsupported. In fact you are mixing DDL and DML statements. Getting a result set with EXECUTE is not supported.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A work-around would be to have the STP create a result set and query that table after calling the STP, effectively splitting up the SELECT and EXECUTE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;-- Jan.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 09:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Call-a-mysql-stored-process-into-SAS-Viya-3-5/m-p/701776#M214918</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2020-11-26T09:11:50Z</dc:date>
    </item>
  </channel>
</rss>

