<?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: Which Function to Use to Update Database? in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8152#M810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to include the visit variable in the BY statement.&lt;/P&gt;&lt;P&gt;UPDATE statement will collapse to one observation per BY group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2012 00:35:10 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-02-21T00:35:10Z</dc:date>
    <item>
      <title>Which Function to Use to Update Database?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8150#M808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a data set of patient data with an original and unique ID number per visit.&amp;nbsp; Occasionally the data is corrected so correction files are produced.&amp;nbsp;&amp;nbsp; THese corrections could include visits not previously submitted and the corrections may only be for one data element.&amp;nbsp; What I would like to have happen is that any new abstracts will be added to the original data set from corrections and any data elements from corrections be updated in submissions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original file is "sub" and the corrected file is "corr".&amp;nbsp; Sub has 1506 records and corr has 13 but when I used update the subsequent dataset was 1065 so it didn't work as planned.&amp;nbsp; The code I used was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data import_results;&lt;/P&gt;&lt;P&gt;update work.sub work.corr;&lt;/P&gt;&lt;P&gt;by Unique_Key;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What function should I be using to get this to work as I'd like?&amp;nbsp; Thanks very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 22:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8150#M808</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-02-20T22:40:10Z</dc:date>
    </item>
    <item>
      <title>Which Function to Use to Update Database?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8151#M809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Were both of your files sorted by Unique_Key ?&amp;nbsp; It they were, seeing your log would be needed to see what may have happened.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they weren't, sort them, then retry your code and let us know if your problem was solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2012 23:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8151#M809</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-20T23:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Which Function to Use to Update Database?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8152#M810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to include the visit variable in the BY statement.&lt;/P&gt;&lt;P&gt;UPDATE statement will collapse to one observation per BY group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 00:35:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8152#M810</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-02-21T00:35:10Z</dc:date>
    </item>
    <item>
      <title>Which Function to Use to Update Database?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8153#M811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know what went wrong with the original but when I sorted them both by Unique_Key and then ran the update, I got 1506 records like I expected.&amp;nbsp; Thank you both for your replies!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 15:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Which-Function-to-Use-to-Update-Database/m-p/8153#M811</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-02-21T15:42:05Z</dc:date>
    </item>
  </channel>
</rss>

