<?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: Proc SQL Execute Command SQL Server Temp Table Back to SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477442#M286219</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we use Oracle but...&lt;/P&gt;&lt;P&gt;there is a "SAS Access Interface to Microsoft SQL Server" chapter in the SAS documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0gz66qe8msnkyn1jgnhrr0l2k8y.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0gz66qe8msnkyn1jgnhrr0l2k8y.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mydblib sqlsvr
   noprompt="uid=testuser;
   pwd=testpass;
   dsn=sqlservr;"
   stringdates=yes;

proc print data=mydblib.customers;
   where state='CA';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Jul 2018 13:11:26 GMT</pubDate>
    <dc:creator>Oligolas</dc:creator>
    <dc:date>2018-07-12T13:11:26Z</dc:date>
    <item>
      <title>Proc SQL Execute Command SQL Server Temp Table Back to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477389#M286218</link>
      <description>&lt;P&gt;I have written code in proc sql using the execute command to run sql code. This all works well and I can create perm/temp files in the SQL db.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For our production version we will only be able to create temp tables (#tablename/##tablename). What I will need to do is bring this temp file into actual sas to create a report and then output to client (Excel/PowerBI). I am conscious that the temp table will only exist for the execute(….) by sqlserver session. Do you know how I can do this?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 10:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477389#M286218</guid>
      <dc:creator>andrewjmdata</dc:creator>
      <dc:date>2018-07-12T10:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Execute Command SQL Server Temp Table Back to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477442#M286219</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we use Oracle but...&lt;/P&gt;&lt;P&gt;there is a "SAS Access Interface to Microsoft SQL Server" chapter in the SAS documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0gz66qe8msnkyn1jgnhrr0l2k8y.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0gz66qe8msnkyn1jgnhrr0l2k8y.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mydblib sqlsvr
   noprompt="uid=testuser;
   pwd=testpass;
   dsn=sqlservr;"
   stringdates=yes;

proc print data=mydblib.customers;
   where state='CA';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Jul 2018 13:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477442#M286219</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-07-12T13:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Execute Command SQL Server Temp Table Back to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477448#M286220</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might be specific to SQLServer,&amp;nbsp; but does your method mean temporary tables can be pulled into SAS as well?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SQLServer they are denoted by #tablename and only exist for the session of the user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 13:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477448#M286220</guid>
      <dc:creator>andrewjmdata</dc:creator>
      <dc:date>2018-07-12T13:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Execute Command SQL Server Temp Table Back to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477774#M286221</link>
      <description>&lt;P&gt;Hi, I don't know you'll have to give it a try&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2018 05:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477774#M286221</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-07-13T05:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Execute Command SQL Server Temp Table Back to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477781#M286222</link>
      <description>I'm pretty sure that those tables exist as long as the connection lives (that's until a DISCONNECT FROM or a PROC SQL QUIT).&lt;BR /&gt;You could verify this by fetching the data using SELECT * FROM CONNECTION TO...</description>
      <pubDate>Fri, 13 Jul 2018 05:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/477781#M286222</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-07-13T05:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SQL Execute Command SQL Server Temp Table Back to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/479001#M286223</link>
      <description>&lt;P&gt;Thanks, I was nicely surprised to see it did work. Many thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 11:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SQL-Execute-Command-SQL-Server-Temp-Table-Back-to-SAS/m-p/479001#M286223</guid>
      <dc:creator>andrewjmdata</dc:creator>
      <dc:date>2018-07-18T11:58:20Z</dc:date>
    </item>
  </channel>
</rss>

