<?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 choose updated table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533605#M146322</link>
    <description>&lt;P&gt;suppose i have two tables, table A and table B both having same column and&amp;nbsp; data types.Either table A or B&amp;nbsp; can have updated values.&lt;/P&gt;&lt;P&gt;I have to fetch data from updated table only.What should be the query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2019 15:05:39 GMT</pubDate>
    <dc:creator>asuman</dc:creator>
    <dc:date>2019-02-07T15:05:39Z</dc:date>
    <item>
      <title>choose updated table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533605#M146322</link>
      <description>&lt;P&gt;suppose i have two tables, table A and table B both having same column and&amp;nbsp; data types.Either table A or B&amp;nbsp; can have updated values.&lt;/P&gt;&lt;P&gt;I have to fetch data from updated table only.What should be the query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 15:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533605#M146322</guid>
      <dc:creator>asuman</dc:creator>
      <dc:date>2019-02-07T15:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: choose updated table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533606#M146323</link>
      <description>&lt;P&gt;What constitutes an 'updated value'? Please be more specific in your requirements and preferably illustrate your problem with sample data.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 15:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533606#M146323</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-02-07T15:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: choose updated table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533611#M146326</link>
      <description>&lt;P&gt;The following query examines properties of two data sets in the same library and reports the name of the data set with the latest modification datetime of for the tables:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select memname
   from dictionary.tables
   where libname='SASHELP' and 
         memname in ('CLASS' 'BASEBALL')
   HAVING modate=max(modate)
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;It does not examine any values or the properties of any variables in either of the tables but is the closest I can think of to identify which table might be 'updated'.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 15:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533611#M146326</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-07T15:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: choose updated table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533634#M146329</link>
      <description>&lt;P&gt;let updated value would be date.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 15:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533634#M146329</guid>
      <dc:creator>asuman</dc:creator>
      <dc:date>2019-02-07T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: choose updated table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533640#M146332</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*create sample data 1*/
data samp_a;
	set sashelp.class;
run;


/*Wait for 1 minute before processing the second sample data to simulate the scenario*/
Data _null_;
	wait=sleep(60,1);
Run;

/*create sample data 1*/
data samp_b;
	set sashelp.class;
run;



%let op=%sysfunc(open(samp_a));
*use the MODTE to obtain the modified date1 and time in sas datetime format;
%let mt1=%sysfunc(attrn(&amp;amp;op,MODTE));
%let op=%sysfunc(close(&amp;amp;op));


%let op=%sysfunc(open(samp_b));
*use the MODTE to obtain the modified date2 and time in sas datetime format;
%let mt2=%sysfunc(attrn(&amp;amp;op,MODTE));
%let op=%sysfunc(close(&amp;amp;op));


*Print the sas datetime values to log;
%put &amp;amp;=mt1 &amp;amp;=mt2;




&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:05:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/choose-updated-table/m-p/533640#M146332</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2019-02-07T16:05:38Z</dc:date>
    </item>
  </channel>
</rss>

