<?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: Foreign Key problems in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Foreign-Key-problems/m-p/474721#M122007</link>
    <description>&lt;P&gt;Please post the same question only once.&lt;/P&gt;
&lt;P&gt;Answer here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Defining-a-foreign-key-on-a-table-in-PROC-SQL-that-is-also-the/m-p/474182&amp;nbsp;" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Defining-a-foreign-key-on-a-table-in-PROC-SQL-that-is-also-the/m-p/474182&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Jul 2018 02:14:11 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-07-01T02:14:11Z</dc:date>
    <item>
      <title>Foreign Key problems</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Foreign-Key-problems/m-p/474132#M121775</link>
      <description>&lt;P&gt;I can't make this code work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table foo (
    id char(11)
  );

  create table bar (
    id char(11)
  );

quit;


proc datasets lib=work;

	modify foo;
		ic create primary key(id);
	modify bar;
		ic create primary key(id);
		ic create fkey = foreign key(id) references foo;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm getting the following errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: An index named id with the same definition but different characteristics exists for file WORK.BAR.DATA.&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jun 2018 15:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Foreign-Key-problems/m-p/474132#M121775</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-06-28T15:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Foreign Key problems</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Foreign-Key-problems/m-p/474721#M122007</link>
      <description>&lt;P&gt;Please post the same question only once.&lt;/P&gt;
&lt;P&gt;Answer here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Defining-a-foreign-key-on-a-table-in-PROC-SQL-that-is-also-the/m-p/474182&amp;nbsp;" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Defining-a-foreign-key-on-a-table-in-PROC-SQL-that-is-also-the/m-p/474182&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2018 02:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Foreign-Key-problems/m-p/474721#M122007</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-07-01T02:14:11Z</dc:date>
    </item>
  </channel>
</rss>

