<?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 Relational Database in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1154#M541</link>
    <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
Please I am having trouble with the syntax for working with relational databases. I have two SAS files on the same CD with a one-to-many relationship and one common field (ID No). &lt;BR /&gt;
Please I need help with with the code/command to read 'simultaneously' from both files/datasets.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
    <pubDate>Wed, 26 Jul 2006 19:13:01 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2006-07-26T19:13:01Z</dc:date>
    <item>
      <title>Relational Database</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1154#M541</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
Please I am having trouble with the syntax for working with relational databases. I have two SAS files on the same CD with a one-to-many relationship and one common field (ID No). &lt;BR /&gt;
Please I need help with with the code/command to read 'simultaneously' from both files/datasets.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Wed, 26 Jul 2006 19:13:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1154#M541</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-07-26T19:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Relational Database</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1155#M542</link>
      <description>Do you mean something more than doing a merge or SQL join?&lt;BR /&gt;
&lt;BR /&gt;
data combined;&lt;BR /&gt;
merge cd.file1 cd.file2;&lt;BR /&gt;
by IDNo;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
If you like SQL you can do the equivalent in PROC SQL.</description>
      <pubDate>Wed, 26 Jul 2006 22:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1155#M542</guid>
      <dc:creator>DouglasMartin</dc:creator>
      <dc:date>2006-07-26T22:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Relational Database</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1156#M543</link>
      <description>Thanks Douglas.&lt;BR /&gt;
However, it appears I'm still not doing something right (I'm really new to SAS). &lt;BR /&gt;
&lt;B&gt;Additional info:&lt;/B&gt; The IDNo represents individual patients. Each patient in file1 has many test results in file2.&lt;BR /&gt;
&lt;BR /&gt;
I am interested in analyzing the data to see, for instance, the mean value of the test results for each patient, etc.&lt;BR /&gt;
Can you help me with the code please, starting from reading the files (my cd drive is 'D').&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the trouble.</description>
      <pubDate>Thu, 27 Jul 2006 13:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1156#M543</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-07-27T13:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Relational Database</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1157#M544</link>
      <description>If you're doing stats based just on the idno variable then you don't need to combine anything - just run proc means on the file2 dataset. &lt;BR /&gt;
&lt;BR /&gt;
So, lets assume you want to display the name (presumably from file1) in place of idno, and do stats on result (presumably in file2). &lt;BR /&gt;
&lt;BR /&gt;
I'm doing this off the top of my head, so there may be typos. I've included some other stats besides mean just to give you a better example.&lt;BR /&gt;
&lt;BR /&gt;
libname cd "D:\";&lt;BR /&gt;
data combined;&lt;BR /&gt;
merge cd.file1 cd.file2;&lt;BR /&gt;
by IDNo;&lt;BR /&gt;
run;&lt;BR /&gt;
proc means data=combined mean std median min max;&lt;BR /&gt;
class name;&lt;BR /&gt;
var result;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
If that's not enough explanation, you really need to consult the documentation.</description>
      <pubDate>Thu, 27 Jul 2006 20:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relational-Database/m-p/1157#M544</guid>
      <dc:creator>DouglasMartin</dc:creator>
      <dc:date>2006-07-27T20:19:03Z</dc:date>
    </item>
  </channel>
</rss>

