<?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: ERROR: Ambiguous reference, column wing_ is in more than one table. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534263#M146581</link>
    <description>&lt;P&gt;If the column is in more than one table then you need to prefix it by either the table name or table alias you wish to select the column from like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MyTable.wing_

/* or */

TableAlias.wing_ &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 10 Feb 2019 08:22:10 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-02-10T08:22:10Z</dc:date>
    <item>
      <title>ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534258#M146577</link>
      <description>&lt;P&gt;Hi Channel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have around 20 tables and joining them using (proc sql union all) and they have 40 columns in common and the log shows only error for one column "ERROR: Ambiguous reference, column wing_ is in more than one table."&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you please advice&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 10 Feb 2019 07:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534258#M146577</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-02-10T07:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534260#M146579</link>
      <description>&lt;P&gt;If it's just a series of select * union all, you're better off with a data step where you put all 20 datasets into one set statement, and the log from that might tell us more.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Feb 2019 07:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534260#M146579</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-10T07:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534262#M146580</link>
      <description>Hi Thanks for reaching out I cannot change that to datastep because I need to convert this step to a pearl sql step. I am curious to see why only one column causing issue as there are 40 more columns in common</description>
      <pubDate>Sun, 10 Feb 2019 08:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534262#M146580</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-02-10T08:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534263#M146581</link>
      <description>&lt;P&gt;If the column is in more than one table then you need to prefix it by either the table name or table alias you wish to select the column from like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MyTable.wing_

/* or */

TableAlias.wing_ &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Feb 2019 08:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534263#M146581</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-02-10T08:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534264#M146582</link>
      <description>&lt;P&gt;thanks for reply but why I a not seeing the same for rest of the columns as there are 40 more columns in common. This is the only one shown up as an error&lt;/P&gt;</description>
      <pubDate>Sun, 10 Feb 2019 08:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534264#M146582</guid>
      <dc:creator>kajal_30</dc:creator>
      <dc:date>2019-02-10T08:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534271#M146587</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Thanks for reaching out I cannot change that to datastep because I need to convert this step to a pearl sql step. I am curious to see why only one column causing issue as there are 40 more columns in common&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I need the result (log) of the datastep for TESTING.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Feb 2019 09:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534271#M146587</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-10T09:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Ambiguous reference, column wing_ is in more than one table.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534274#M146589</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259983"&gt;@kajal_30&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears this is a slightly misleading error message.&lt;/P&gt;
&lt;P&gt;I can replicate the error message when using a SQL UNION having variables in the SELECT listed where at least for one of the tables the variable doesn't actually exist in the source.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a b(drop=wing_);
  set sashelp.class;
  wing_='1';
run;

proc sql;
  create table test as
  select name,wing_ from a
  union 
  select name,wing_ from b
  ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: Ambiguous reference, column wing_ is in more than one table.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Feb 2019 09:36:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Ambiguous-reference-column-wing-is-in-more-than-one-table/m-p/534274#M146589</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-02-10T09:36:53Z</dc:date>
    </item>
  </channel>
</rss>

