<?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 unresolved reference to table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819156#M34710</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I am adding current balance details in the table but getting unresolved errors.&lt;/P&gt;
&lt;P&gt;I have checked the accountkey in table a and b are numeric. Can you please suggest what's causing the errors?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table adding_accountkey as 
select a.*,
b.accountkey
from work.stamped_result as a
left join dwhdw.dim_account as b on a.debt_code =b.accountnumber 
order by debt_code;
quit;
(Till here it works perfect. The errors come in the second code)


proc sql;
  create table Current_balance as
  select 
a.*,
b.CurrentBalance
  from work.adding_accountkey as a 

        left join dwhdw.fact_snapshot_accountstatus as a
        on a.accountkey = b.accountkey      ;
quit;

Error in the log:
30         proc sql;
31           create table Current_balance as
32           select
33         a.*,
34         b.CurrentBalance
35           from work.adding_accountkey as a
36         
37                 left join dwhdw.fact_snapshot_accountstatus as a
38                 on a.accountkey = b.accountkey
39         
40         ;
ERROR: Column a.accountkey was found in more than one table in the same scope.
ERROR: Unresolved reference to table/correlation name b.
WARNING: Correlation name a identifies more than one table.
ERROR: Unresolved reference to table/correlation name b.
ERROR: Expression using equals (=) has components that are of different data types.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
41         quit;
NOTE: The SAS System stopped processing this step because of errors.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Jun 2022 15:06:19 GMT</pubDate>
    <dc:creator>Sandeep77</dc:creator>
    <dc:date>2022-06-20T15:06:19Z</dc:date>
    <item>
      <title>unresolved reference to table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819156#M34710</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I am adding current balance details in the table but getting unresolved errors.&lt;/P&gt;
&lt;P&gt;I have checked the accountkey in table a and b are numeric. Can you please suggest what's causing the errors?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table adding_accountkey as 
select a.*,
b.accountkey
from work.stamped_result as a
left join dwhdw.dim_account as b on a.debt_code =b.accountnumber 
order by debt_code;
quit;
(Till here it works perfect. The errors come in the second code)


proc sql;
  create table Current_balance as
  select 
a.*,
b.CurrentBalance
  from work.adding_accountkey as a 

        left join dwhdw.fact_snapshot_accountstatus as a
        on a.accountkey = b.accountkey      ;
quit;

Error in the log:
30         proc sql;
31           create table Current_balance as
32           select
33         a.*,
34         b.CurrentBalance
35           from work.adding_accountkey as a
36         
37                 left join dwhdw.fact_snapshot_accountstatus as a
38                 on a.accountkey = b.accountkey
39         
40         ;
ERROR: Column a.accountkey was found in more than one table in the same scope.
ERROR: Unresolved reference to table/correlation name b.
WARNING: Correlation name a identifies more than one table.
ERROR: Unresolved reference to table/correlation name b.
ERROR: Expression using equals (=) has components that are of different data types.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
41         quit;
NOTE: The SAS System stopped processing this step because of errors.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jun 2022 15:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819156#M34710</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-06-20T15:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: unresolved reference to table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819158#M34711</link>
      <description>&lt;PRE&gt;  from work.adding_accountkey as&lt;FONT size="5"&gt;&lt;STRONG&gt; a&lt;/STRONG&gt; &lt;/FONT&gt;

        left join dwhdw.fact_snapshot_accountstatus as&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt; a&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;You used the same alias, A, for both data sets. One of these A have to be B to use b.anyvariablename&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 15:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819158#M34711</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-20T15:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: unresolved reference to table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819160#M34712</link>
      <description>&lt;PRE&gt;  from work.adding_accountkey &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;as a&lt;/STRONG&gt;&lt;/FONT&gt; 

        left join dwhdw.fact_snapshot_accountstatus &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;as a&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;You've aliased both tables as A.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change one to B.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/391779"&gt;@Sandeep77&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I am adding current balance details in the table but getting unresolved errors.&lt;/P&gt;
&lt;P&gt;I have checked the accountkey in table a and b are numeric. Can you please suggest what's causing the errors?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table adding_accountkey as 
select a.*,
b.accountkey
from work.stamped_result as a
left join dwhdw.dim_account as b on a.debt_code =b.accountnumber 
order by debt_code;
quit;
(Till here it works perfect. The errors come in the second code)


proc sql;
  create table Current_balance as
  select 
a.*,
b.CurrentBalance
  from work.adding_accountkey as a 

        left join dwhdw.fact_snapshot_accountstatus as a
        on a.accountkey = b.accountkey      ;
quit;

Error in the log:
30         proc sql;
31           create table Current_balance as
32           select
33         a.*,
34         b.CurrentBalance
35           from work.adding_accountkey as a
36         
37                 left join dwhdw.fact_snapshot_accountstatus as a
38                 on a.accountkey = b.accountkey
39         
40         ;
ERROR: Column a.accountkey was found in more than one table in the same scope.
ERROR: Unresolved reference to table/correlation name b.
WARNING: Correlation name a identifies more than one table.
ERROR: Unresolved reference to table/correlation name b.
ERROR: Expression using equals (=) has components that are of different data types.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
41         quit;
NOTE: The SAS System stopped processing this step because of errors.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 15:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unresolved-reference-to-table/m-p/819160#M34712</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-06-20T15:16:43Z</dc:date>
    </item>
  </channel>
</rss>

