<?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 IMSTAT deleterows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-IMSTAT-deleterows/m-p/632583#M187565</link>
    <description>&lt;P&gt;Any advice? I spend several days on it and have no idea. I don't found any option to extend macro variable.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 07:32:21 GMT</pubDate>
    <dc:creator>strakenobody</dc:creator>
    <dc:date>2020-03-17T07:32:21Z</dc:date>
    <item>
      <title>PROC IMSTAT deleterows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-IMSTAT-deleterows/m-p/631806#M187221</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;how to efficiently delete millions of records from the LASR table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to load and append the incremental data (few millions of records) into the big table (bilions of records) on the LASR. Before appending (proc imstat with set statement), there is deleting:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql noprint;
	select distinct(id) into :ids separated by ','
	from incremental_table;
quit;
		
PROC IMSTAT data=LASR_LIB.BIG_TABLE
	WHERE ID in (&amp;amp;ids.);
RUN;
	deleterows;
RUN;&lt;/PRE&gt;&lt;P&gt;But this statement finish with error:&lt;/P&gt;&lt;P&gt;ERROR: The length of the value of the macro variable ids (387453) exceeds the maximum length (65534).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doing this in a loop&amp;nbsp;does't make sense - the whole procedure takes hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best practice to delete records from LASR table? Or generally to append incremental data?&amp;nbsp;Maybe some merge option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Piotr&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 09:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-IMSTAT-deleterows/m-p/631806#M187221</guid>
      <dc:creator>strakenobody</dc:creator>
      <dc:date>2020-03-13T09:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMSTAT deleterows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-IMSTAT-deleterows/m-p/632583#M187565</link>
      <description>&lt;P&gt;Any advice? I spend several days on it and have no idea. I don't found any option to extend macro variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 07:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-IMSTAT-deleterows/m-p/632583#M187565</guid>
      <dc:creator>strakenobody</dc:creator>
      <dc:date>2020-03-17T07:32:21Z</dc:date>
    </item>
  </channel>
</rss>

