<?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: Multiple Volatile teradata  tables in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Volatile-teradata-tables-in-SAS/m-p/271901#M54087</link>
    <description>&lt;P&gt;I'm a bit late to the party with this reply, but in case someone else finds this in the future...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x  teradata server=&amp;amp;server authdomain=&amp;amp;authdomain connection=global &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;dbmstemp=yes&lt;/FONT&gt;&lt;/STRONG&gt;;

&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;options sastrace=',,,d' sastraceloc=saslog;&lt;/STRONG&gt;&lt;/FONT&gt;

data x.vol1;
   do x=1 to 10;
      output;
   end;
run;

data x.vol2;
   set x.vol1;
   y=x**2;
run;

* explicit passthru ;
proc sql;
   connect to teradata(server=&amp;amp;server authdomain=&amp;amp;authdomain connection=global);
   execute (
      CREATE MULTISET VOLATILE TABLE vol3 AS 
      (
         SELECT x,y,(x**3) as z FROM vol2
      ) WITH DATA
      ON COMMIT PRESERVE ROWS
   ) by teradata;
   execute (COMMIT WORK) by teradata;
quit;

* data returned in indeterminate order ;
title "vol1";
proc print data=x.vol1;
run;

title "vol2";
proc print data=x.vol2;
run;

title "vol3";
proc print data=x.vol3;
run;

proc sql;
   title "SQL select";
   select * from x.vol3 order by x;
   create view foo as select * from x.vol3 order by x;
quit;

title "foo view";
proc print data=foo;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Pay close attention to the trace output in the SAS log.&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2016 05:49:28 GMT</pubDate>
    <dc:creator>ScottBass</dc:creator>
    <dc:date>2016-05-20T05:49:28Z</dc:date>
    <item>
      <title>Multiple Volatile teradata  tables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Volatile-teradata-tables-in-SAS/m-p/200170#M37417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to create multiple volatile teradata&amp;nbsp; tables in the same SAS session?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. Create a volatile table called vol1 with 10 records in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then create a 2nd volatile table called vol2 that will read the records from vol1. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 17:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Volatile-teradata-tables-in-SAS/m-p/200170#M37417</guid>
      <dc:creator>Premier</dc:creator>
      <dc:date>2015-03-12T17:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Volatile teradata  tables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Volatile-teradata-tables-in-SAS/m-p/271901#M54087</link>
      <description>&lt;P&gt;I'm a bit late to the party with this reply, but in case someone else finds this in the future...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x  teradata server=&amp;amp;server authdomain=&amp;amp;authdomain connection=global &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;dbmstemp=yes&lt;/FONT&gt;&lt;/STRONG&gt;;

&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;options sastrace=',,,d' sastraceloc=saslog;&lt;/STRONG&gt;&lt;/FONT&gt;

data x.vol1;
   do x=1 to 10;
      output;
   end;
run;

data x.vol2;
   set x.vol1;
   y=x**2;
run;

* explicit passthru ;
proc sql;
   connect to teradata(server=&amp;amp;server authdomain=&amp;amp;authdomain connection=global);
   execute (
      CREATE MULTISET VOLATILE TABLE vol3 AS 
      (
         SELECT x,y,(x**3) as z FROM vol2
      ) WITH DATA
      ON COMMIT PRESERVE ROWS
   ) by teradata;
   execute (COMMIT WORK) by teradata;
quit;

* data returned in indeterminate order ;
title "vol1";
proc print data=x.vol1;
run;

title "vol2";
proc print data=x.vol2;
run;

title "vol3";
proc print data=x.vol3;
run;

proc sql;
   title "SQL select";
   select * from x.vol3 order by x;
   create view foo as select * from x.vol3 order by x;
quit;

title "foo view";
proc print data=foo;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Pay close attention to the trace output in the SAS log.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 05:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Volatile-teradata-tables-in-SAS/m-p/271901#M54087</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2016-05-20T05:49:28Z</dc:date>
    </item>
  </channel>
</rss>

