<?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 establish connection and read from SQL Server stored procedure. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717684#M221975</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;PROC&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Connection string to exec stored procedure that works..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;CONNECT&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;TO&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ODBC(NOPROMPT=&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"DRIVER={ODBC Driver 13 for SQL Server}; SERVER=&amp;amp;svr_nm.; database=&amp;amp;DB_nm.; Trusted_Connection=yes;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;CREATE&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; WORK.Daily_copy &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;AS&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; * &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CONNECTION TO ODBC (exec &amp;amp;sp.);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ODBC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 18:55:30 GMT</pubDate>
    <dc:creator>Stalk</dc:creator>
    <dc:date>2021-02-08T18:55:30Z</dc:date>
    <item>
      <title>How to establish connection and read from SQL Server stored procedure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717465#M221884</link>
      <description>&lt;P&gt;How to establish SQL server&amp;nbsp;connection string in SAS&amp;nbsp; using the following credentials?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Stored Procedure:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSSP_RES_V12_Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 18:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717465#M221884</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-02-08T18:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to establish connection and read from SQL Server stored procedure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717466#M221885</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;This Oracle example can be easily modified for SQL Server: &lt;A href="https://support.sas.com/kb/18/350.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/18/350.html&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Which SAS/ACCESS product are you using? SAS/ACCESS to SQL Server or SAS/ACCESS to ODBC?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Please note you can't read a result set while running a stored procedure. The workaround is to have the stored procedure create a temporary table then read that in a following PASSTHRU query with a SELECT statement.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 00:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717466#M221885</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-02-08T00:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to establish connection and read from SQL Server stored procedure.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717684#M221975</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;PROC&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Connection string to exec stored procedure that works..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;CONNECT&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;TO&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ODBC(NOPROMPT=&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"DRIVER={ODBC Driver 13 for SQL Server}; SERVER=&amp;amp;svr_nm.; database=&amp;amp;DB_nm.; Trusted_Connection=yes;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;CREATE&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; WORK.Daily_copy &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;AS&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; * &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CONNECTION TO ODBC (exec &amp;amp;sp.);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;DISCONNECT&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ODBC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 18:55:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-establish-connection-and-read-from-SQL-Server-stored/m-p/717684#M221975</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2021-02-08T18:55:30Z</dc:date>
    </item>
  </channel>
</rss>

