<?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: Adding information to imported data set. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815890#M34267</link>
    <description>&lt;PRE&gt;&lt;CODE class=""&gt;proc sql;
create table Accounts_left_Trace AS
Select
account_code
From work.acc_left_trace; (acc_left_trace is the file that I mported in SAS)
quit;

proc sql;
create table Add_repcode AS
Select a.*,
b.rep_code
From work.acc_left_trace&lt;FONT size="6" color="#FF0000"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt; as A&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;
inner join p2scflow.debt as b on a.debt_code = b.debt_code;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The underlined highlighted text assigns an alias of A to the data set Acc_left so you can use that in the A.debt_code or A.*.&lt;/P&gt;
&lt;P&gt;You did that for the alias B, so I am very confused why not noticing it was not done for A.&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2022 16:13:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-05-31T16:13:04Z</dc:date>
    <item>
      <title>Adding information to imported data set.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815873#M34264</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I have imported the data in SAS. Now I am trying to add few more information but I am getting error as unresolved reference. Please guide me as I am a new user.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sql;
create table Add_repcode AS
Select a.*,
b.rep_code
From work.acc_left_trace
inner join p2scflow.debt as b on a.debt_code = b.debt_code;
quit;

I am getting below error:

29         proc sql;
30         create table Add_repcode AS
31         Select a.*,
32         b.rep_code
33         From work.acc_left_trace
34         inner join p2scflow.debt as b on a.debt_code = b.debt_code;
ERROR: Unresolved reference to table/correlation name a.
ERROR: Could not expand a.*, correlation name not found.
ERROR: The following columns were not found in the contributing tables: a.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
35         quit;
NOTE: The SAS System stopped processing this step because of errors.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2022 15:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815873#M34264</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-05-31T15:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding information to imported data set.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815876#M34265</link>
      <description>&lt;P&gt;Your code is referring to table A, but you never told it which table was table A.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You only told it which table was table B.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;inner join p2scflow.debt as b&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How do you think you should change this line so that it defines a table reference of A?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;From work.acc_left_trace&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2022 15:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815876#M34265</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-31T15:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding information to imported data set.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815885#M34266</link>
      <description>&lt;P&gt;I am not very sure about it. I first imported a file and then created a table. Then I am trying to add the rep code information to those account number but it's not working.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sql;
create table Accounts_left_Trace AS
Select
account_code
From work.acc_left_trace; (acc_left_trace is the file that I mported in SAS)
quit;

proc sql;
create table Add_repcode AS
Select a.*,
b.rep_code
From work.acc_left_trace
inner join p2scflow.debt as b on a.debt_code = b.debt_code;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 May 2022 16:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815885#M34266</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-05-31T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding information to imported data set.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815890#M34267</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;proc sql;
create table Accounts_left_Trace AS
Select
account_code
From work.acc_left_trace; (acc_left_trace is the file that I mported in SAS)
quit;

proc sql;
create table Add_repcode AS
Select a.*,
b.rep_code
From work.acc_left_trace&lt;FONT size="6" color="#FF0000"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt; as A&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;
inner join p2scflow.debt as b on a.debt_code = b.debt_code;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The underlined highlighted text assigns an alias of A to the data set Acc_left so you can use that in the A.debt_code or A.*.&lt;/P&gt;
&lt;P&gt;You did that for the alias B, so I am very confused why not noticing it was not done for A.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Adding-information-to-imported-data-set/m-p/815890#M34267</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-31T16:13:04Z</dc:date>
    </item>
  </channel>
</rss>

