<?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: Teradata pass-through query insert into volatile table from WORK library table error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Teradata-pass-through-query-insert-into-volatile-table-from-WORK/m-p/511553#M137684</link>
    <description>&lt;P&gt;You are sending code to Teradata asking it to use table WORK.TESTFILE.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Teradata cannot see this table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append base=X.MY_VOL_TBL&amp;nbsp;data=WORK.TESTFILE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Nov 2018 21:58:54 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-11-08T21:58:54Z</dc:date>
    <item>
      <title>Teradata pass-through query insert into volatile table from WORK library table error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-pass-through-query-insert-into-volatile-table-from-WORK/m-p/511463#M137633</link>
      <description>&lt;P&gt;I'm using the SAS/Teradata pass-through facility to create a volatile table and then insert data into it from a table in the WORK library. My work table has one field (my_var) and two rows with the values 'foo' and 'bar' called work.test_file. As you can see I use a global connection in the libref and connection strings. My query is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x teradata tdpid=myDBC authdomain="teraauth" mode=teradata connection=global; /* dbmstemp=yes */

proc sql;
  connect to teradata (tdpid=myDBC authdomain="teraauth" mode=teradata connection=global bulkload=yes);
  execute (CREATE VOLATILE TABLE my_vol_tbl (my_var char)
	       ON COMMIT PRESERVE ROWS
          ) by teradata;
quit;

proc sql;
  connect to teradata (tdpid=myDBC authdomain="teraauth" mode=teradata connection=global bulkload=yes);
  execute (INSERT INTO my_vol_tbl SELECT * FROM work.test_file) by teradata;
quit;

data final_test_tbl;
   set x.my_vol_tbl;
   put _all_;
run;

libname x clear;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The creation of the volatile table works. The error occurs under where I try to INSERT INTO my_vol_tbl SELECT * FROM work.test_file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;33 execute (INSERT INTO my_temp_tbl SELECT * FROM work.test_file) by teradata;&lt;BR /&gt;ERROR: Teradata execute: Syntax error, expected something like a name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword&lt;BR /&gt;or '(' between the 'FROM' keyword and the 'work' keyword.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2018 18:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-pass-through-query-insert-into-volatile-table-from-WORK/m-p/511463#M137633</guid>
      <dc:creator>JediApprentice</dc:creator>
      <dc:date>2018-11-08T18:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Teradata pass-through query insert into volatile table from WORK library table error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Teradata-pass-through-query-insert-into-volatile-table-from-WORK/m-p/511553#M137684</link>
      <description>&lt;P&gt;You are sending code to Teradata asking it to use table WORK.TESTFILE.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Teradata cannot see this table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append base=X.MY_VOL_TBL&amp;nbsp;data=WORK.TESTFILE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2018 21:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Teradata-pass-through-query-insert-into-volatile-table-from-WORK/m-p/511553#M137684</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-11-08T21:58:54Z</dc:date>
    </item>
  </channel>
</rss>

