<?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: Error loading to netezza table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816493#M322294</link>
    <description>&lt;P&gt;This can never work.&lt;/P&gt;
&lt;P&gt;TEMP2 is a dataset in the SAS WORK library, but everything within the parentheses&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Execute(INSERT INTO &amp;amp;out_table select * from TEMP2
			) by NETEZZA;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is executed solely within the DB, which does not have any connection to your SAS WORK. The EXECUTE code could only work if TEMP2 was uploaded first to Netezza.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Jun 2022 09:42:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-06-04T09:42:41Z</dc:date>
    <item>
      <title>Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816334#M322193</link>
      <description>&lt;P&gt;I am trying importing one excel file into sas table and then creating temporary dataset adding 2 new columns target_load_ts&amp;nbsp; and yearmonth.&amp;nbsp; but while loading the netezza table from the work table getting CLI execute error. error: Relation does not exist nzdb.pdit.temp2.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC IMPORT 
		OUT= TEMP1 
		DATAFILE= "/sas/test/files/&amp;amp;in_file..xlsx" 
		DBMS=xlsx 
		REPLACE;
		GETNAMES=YES;
	RUN;

	DATA  TEMP2;
		SET  TEMP1;
		TARGET_LOAD_TS = datetime();
		yearmonth = &amp;amp;date_er.;
		FORMAT TARGET_LOAD_TS datetime20.;
	RUN;

	proc sql;
		connect to &amp;amp;NZCONN.;
		Execute(INSERT INTO &amp;amp;out_table select * from TEMP2
			) by NETEZZA;

		%setNZRC(&amp;amp;SQLRC);
		Disconnect from NETEZZA;
	quit;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jun 2022 14:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816334#M322193</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-03T14:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816488#M322290</link>
      <description>&lt;PRE&gt;Execute ( &lt;FONT color="#0000FF"&gt;INSERT INTO &amp;amp;out_table select * from TEMP2&lt;/FONT&gt; ) by NETEZZA;
&lt;/PRE&gt;
&lt;P&gt;The bit in blue executes in&amp;nbsp;NETEZZA right?&lt;/P&gt;
&lt;P&gt;Do you have a table called TEMP2 in&amp;nbsp;NETEZZA?&lt;/P&gt;
&lt;P&gt;Since you don't, you need to upload it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't do that, just run something like a proc append and SAS will upload the data for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 06:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816488#M322290</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-06-04T06:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816493#M322294</link>
      <description>&lt;P&gt;This can never work.&lt;/P&gt;
&lt;P&gt;TEMP2 is a dataset in the SAS WORK library, but everything within the parentheses&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Execute(INSERT INTO &amp;amp;out_table select * from TEMP2
			) by NETEZZA;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is executed solely within the DB, which does not have any connection to your SAS WORK. The EXECUTE code could only work if TEMP2 was uploaded first to Netezza.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 09:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816493#M322294</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-04T09:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816512#M322312</link>
      <description>&lt;P&gt;yes temp2 itself is my final table which I want to load to Netezza. Is there a way I can upload it to Netezza as I already have the table metadata in the Netezza but with a different name.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2022 20:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816512#M322312</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-04T20:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816515#M322314</link>
      <description>&lt;P&gt;Try creating a libref using the LIBNAME statement instead of using the CONNECT statement of PROC SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So say you defined the libref NETZ and there is a table there named FRED you could try to load the data from WORK.TEMP2 by using PROC APPEND code like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append base=NETZ.FRED data=TEMP2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Jun 2022 21:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816515#M322314</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-06-04T21:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816526#M322320</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much. At first sight it seems like it worked but at the end I saw weird results log says&lt;/P&gt;&lt;P&gt;NOTE: There were 1 observations read from the data set WORK2.TEMP2.&lt;BR /&gt;NOTE: 1 observations added.&lt;BR /&gt;NOTE: The data set NZlib.abc has . observations and 2 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jagdeep&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2022 06:46:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816526#M322320</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2022-06-05T06:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error loading to netezza table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816530#M322322</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much. At first sight it seems like it worked but at the end I saw weird results log says&lt;/P&gt;
&lt;P&gt;NOTE: There were 1 observations read from the data set WORK2.TEMP2.&lt;BR /&gt;NOTE: 1 observations added.&lt;BR /&gt;NOTE: The data set NZlib.abc has . observations and 2 variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please advise&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jagdeep&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Looks like the append worked, but Netezza does not return a proper row number.&lt;/P&gt;
&lt;P&gt;Inspect the target dataset in the DB to see if the append really worked as intended.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jun 2022 09:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-loading-to-netezza-table/m-p/816530#M322322</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-05T09:46:16Z</dc:date>
    </item>
  </channel>
</rss>

