<?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: Running SQL stored procedure inside SAS in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740686#M38783</link>
    <description>&lt;P&gt;Thank you for your responses. Just one final comment because it seems not many people are aware that with Pcfiles you can create the same connection as with ODBC:&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;connect to pcfiles as myconn (server= port= dsn= user= password="");&lt;/P&gt;
&lt;P&gt;create&amp;nbsp; &amp;nbsp;table&amp;nbsp; &amp;nbsp;SAS_table_name (compress = Y) as&lt;BR /&gt;select&amp;nbsp; *&amp;nbsp; from connection to myconn(&lt;BR /&gt;select * &lt;BR /&gt;from [SQL_table_name.] );&lt;BR /&gt;disconnect from myconn;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 00:57:45 GMT</pubDate>
    <dc:creator>VSht</dc:creator>
    <dc:date>2021-05-12T00:57:45Z</dc:date>
    <item>
      <title>Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740659#M38780</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is it possible to run a SQL stored procedure inside SAS?&lt;/P&gt;
&lt;P&gt;SQL developers want to have a SQL stored procedure, which can update a column in SQL table based on SAS table values.&lt;/P&gt;
&lt;P&gt;We do not have ODBC, we connect SAS and SQL with pcfiles.&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 23:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740659#M38780</guid>
      <dc:creator>VSht</dc:creator>
      <dc:date>2021-05-11T23:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740673#M38781</link>
      <description>&lt;P&gt;Yes, using the EXECUTE statement in a PROC SQL passthru with an appropriate SAS/ACCESS product connecting to the database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an &lt;A href="https://support.sas.com/kb/18/350.html" target="_blank" rel="noopener"&gt;example&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No idea if this would work using SAS PC Files Server. Perhaps you could try it yourself.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 00:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740673#M38781</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-12T00:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740680#M38782</link>
      <description>&lt;P&gt;The answer is no.&lt;BR /&gt;One needs to connect to the respective&amp;nbsp; databases system which will execute the stored procedure.&lt;BR /&gt;SAS needs to connect to the databases system using SAS Access Interface to the respective data base system or atleast SAS Access Interface to ODBC, Then SAS passes the SQL code (SQL pass through) to the database to execute the code.&lt;BR /&gt;If you have SAS Access interface to PCFILES, then you can convert the data to csv or excel which can be used to upload the data to the databases.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 00:50:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740680#M38782</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-12T00:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740686#M38783</link>
      <description>&lt;P&gt;Thank you for your responses. Just one final comment because it seems not many people are aware that with Pcfiles you can create the same connection as with ODBC:&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;connect to pcfiles as myconn (server= port= dsn= user= password="");&lt;/P&gt;
&lt;P&gt;create&amp;nbsp; &amp;nbsp;table&amp;nbsp; &amp;nbsp;SAS_table_name (compress = Y) as&lt;BR /&gt;select&amp;nbsp; *&amp;nbsp; from connection to myconn(&lt;BR /&gt;select * &lt;BR /&gt;from [SQL_table_name.] );&lt;BR /&gt;disconnect from myconn;&lt;BR /&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 00:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740686#M38783</guid>
      <dc:creator>VSht</dc:creator>
      <dc:date>2021-05-12T00:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740687#M38784</link>
      <description>&lt;P&gt;I'm aware of that approach. Can you try the EXECUTE statement and post your findings here. I'm interested to know!&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740687#M38784</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-12T01:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740689#M38785</link>
      <description>&lt;P&gt;Thank you, I will try your suggestion.&lt;/P&gt;
&lt;P&gt;However, I've just learned that this can be done easier - just by using a normal UPDATE statement and referring SQL Server LIBNAME.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:06:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740689#M38785</guid>
      <dc:creator>VSht</dc:creator>
      <dc:date>2021-05-12T01:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740690#M38786</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   connect to pcfiles as myconn (server= port= dsn= user= password="")  ;
   execute (execute st_pr_name('parm')) by myconn;
   disconnect from myconn;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 May 2021 01:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740690#M38786</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-12T01:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740691#M38787</link>
      <description>&lt;P&gt;Fantastic! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740691#M38787</guid>
      <dc:creator>VSht</dc:creator>
      <dc:date>2021-05-12T01:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740692#M38788</link>
      <description>&lt;P&gt;If you have an SQL Server LIBNAME what engine does it use?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740692#M38788</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-12T01:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740694#M38789</link>
      <description>&lt;P&gt;We are using PC Files engine.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VSht_0-1620782246664.png" style="width: 745px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59260i82CBF2FE7B3DBEAA/image-dimensions/745x88?v=v2" width="745" height="88" role="button" title="VSht_0-1620782246664.png" alt="VSht_0-1620782246664.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acpcref/n1qk7lv0f535qkn1mydookwetyrp.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acpcref/n1qk7lv0f535qkn1mydookwetyrp.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740694#M38789</guid>
      <dc:creator>VSht</dc:creator>
      <dc:date>2021-05-12T01:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740695#M38790</link>
      <description>&lt;P&gt;Thanks. I was not aware that SAS Access Interface to PC files can function as ODBC.&lt;BR /&gt;Wondering if it can connect to RDBMS for example Oracle on Unix systems?&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740695#M38790</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-12T01:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Running SQL stored procedure inside SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740696#M38791</link>
      <description>&lt;P&gt;From my conversation to SAS TechSupport this morning I would guess - yes. But I have not tried.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Running-SQL-stored-procedure-inside-SAS/m-p/740696#M38791</guid>
      <dc:creator>VSht</dc:creator>
      <dc:date>2021-05-12T01:21:23Z</dc:date>
    </item>
  </channel>
</rss>

