<?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: Incorrect Table in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839579#M36354</link>
    <description>&lt;P&gt;The @ indicator points to character columns, not "logical" columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your other post, you talk about csv files, but there are no commas in the datalines.&lt;/P&gt;
&lt;P&gt;If you need to read from csv files, open them with a text editor (not with Excel!) and copy/paste the contents into a code box here.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 06:38:42 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-10-20T06:38:42Z</dc:date>
    <item>
      <title>Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839568#M36351</link>
      <description>&lt;PRE&gt;Data passenger;
infile cards missover;
input @1 Rank $2. @2 Name $40. @3 Code $3. @4 City $12. @5 State $2. @6 yr2014 COMMA10.2 @7 yr2013 COMMA10.2 @8 yr2012 COMMA10.2 @9 yr2011 COMMA10.2;  
cards;
1 Hartsfield CJackson Atlanta International AirportATL Atlanta GA 46604273 45308407 45798809 44414121
2 Los Angeles International AirportLAX Los AngelesCA 34314197 32425892 31326268 30528737
3 O'Hare International AirportORD Chicago IL 33686811 32317835 32171743 31892301
4 Dallas/Fort Worth International AirportDFW Dallas/Fort WorthTX 30766940 29038128 28022877 27518358
5 John F. Kennedy International AirportJFK New York NY 26244928 25036358 24520943 23664830
6 Denver International AirportDEN Denver CO 26000591 25496885 25799832 25667499
7 San Francisco International AirportSFO San FranciscoCA 22756008 21704626 21284224 20038679
8 Charlotte Douglas International AirportCLT Charlotte NC 21542277 21346601 20032426 19022535
9 McCarran International AirportLAS Las Vegas NV 20551016 19946179 19941173 19854759
10 Phoenix Sky Harbor International AirportPHX Phoenix AZ 20344867 19525109 19556189 19750306
;
run;

proc sql;
select*
from passenger;
quit;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (1197).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76372iD719F5535CD673BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1197).png" alt="Screenshot (1197).png" /&gt;&lt;/span&gt;&amp;nbsp;Any help as to why my table isnt matching the correct output on the right(of the screenshot) would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 03:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839568#M36351</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T03:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839569#M36352</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Here is the instructions for context:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;STAT 325 HOMEWORK 5 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;sql &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Data description: Here are two datasets about top 10 busiest airports in the US. One is based on passengers’ &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;statistics from 2011 to 2014 (passenger.csv). The other is based on cargo statistics (cargo.csv). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Passenger.csv: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 1: Rank; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 2: Name; (Airport name) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 3: Code; (Airport IATA Code) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column4: City; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column5: State; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column6: Number of passengers in 2014; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column7: Number of passengers in 2013; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column8: Number of passengers in 2012; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column9: Number o&lt;/SPAN&gt;&lt;SPAN class=""&gt;f passengers in 2011; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Cargo.csv: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 1: Rank; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 2: Name; (Airport name) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 3: Location; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 4: Code; (Airport IATA Code) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 5: Cargo weight in 2014; (unit in pounds) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 6: Cargo weight in 2013; (unit in pounds) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 7: Ca&lt;/SPAN&gt;&lt;SPAN class=""&gt;rgo weight in 2012; (unit in pounds) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Column 8: Cargo weight in 2011; (unit in pounds) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Source: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;A href="https://en.wikipedia.org/wiki/List_of_the_busiest_airports_in_the_United_States#10_busiest_US_ai" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/List_of_the_busiest_airports_in_the_United_States#10_busiest_US_ai&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;rports_by_i &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;nternational_passenger_traffic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Note: Please specify question mark as a comment before your program (eg /*question 1*/): &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt; &lt;SPAN class=""&gt;Read in the passenger.csv data file and apply &lt;/SPAN&gt;&lt;SPAN class=""&gt;COMM&lt;/SPAN&gt;&lt;SPAN class=""&gt;A&lt;/SPAN&gt;&lt;SPAN class=""&gt;w. &lt;/SPAN&gt;&lt;SPAN class=""&gt;format for the number of passenger;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Oct 2022 03:55:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839569#M36352</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T03:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839572#M36353</link>
      <description>&lt;P&gt;I have no clue as to what is wrong with my code to be getting this incorrect table output.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 05:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839572#M36353</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T05:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839579#M36354</link>
      <description>&lt;P&gt;The @ indicator points to character columns, not "logical" columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your other post, you talk about csv files, but there are no commas in the datalines.&lt;/P&gt;
&lt;P&gt;If you need to read from csv files, open them with a text editor (not with Excel!) and copy/paste the contents into a code box here.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 06:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839579#M36354</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-20T06:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839581#M36355</link>
      <description>&lt;P&gt;Updated code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Question1*/
Data passenger;
infile '/home/u62108616/sasuser.v94/S325/passenger.csv' ; 
input @1 rank $2. @2 name $50. @3 code $3. @4 city $50. @5 state $2. @6 yr2014 @7 yr2013 @8 yr2012 @9 yr2011;
Format yr2014 COMMA15.0 yr2013 COMMA15.0 yr2012 COMMA15.0 yr2011 COMMA15.0;
run;

/*Question2*/
proc sql;
select*
from passenger;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (1198).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76373i261D8F3D97A8C11E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1198).png" alt="Screenshot (1198).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 06:46:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839581#M36355</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T06:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839584#M36356</link>
      <description>&lt;P&gt;Quote from myself:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If you need to read from csv files, open them with a text editor (not with Excel!) and copy/paste the contents into a code box here.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;We need to see your raw data.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 07:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839584#M36356</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-20T07:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839627#M36359</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;1 Hartsfield CJackson Atlanta International AirportATL Atlanta GA 46604273 45308407 45798809 44414121
2 Los Angeles International AirportLAX Los AngelesCA 34314197 32425892 31326268 30528737
3 O'Hare International AirportORD Chicago IL 33686811 32317835 32171743 31892301
4 Dallas/Fort Worth International AirportDFW Dallas/Fort WorthTX 30766940 29038128 28022877 27518358
5 John F. Kennedy International AirportJFK New York NY 26244928 25036358 24520943 23664830
6 Denver International AirportDEN Denver CO 26000591 25496885 25799832 25667499
7 San Francisco International AirportSFO San FranciscoCA 22756008 21704626 21284224 20038679
8 Charlotte Douglas International AirportCLT Charlotte NC 21542277 21346601 20032426 19022535
9 McCarran International AirportLAS Las Vegas NV 20551016 19946179 19941173 19854759
10 Phoenix Sky Harbor International AirportPHX Phoenix AZ 20344867 19525109 19556189 19750306&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2022 12:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839627#M36359</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T12:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839630#M36360</link>
      <description>&lt;P&gt;I was able to fix this issue, however, I am stuck on this portion now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;3) Find the average number of passenger in the top ten airport in 2014, label it as ‘Average passenger in &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;2014’ in the format of &lt;/SPAN&gt;&lt;SPAN class=""&gt;COMMA&lt;/SPAN&gt;&lt;SPAN class=""&gt;w. &lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;4)&amp;nbsp;Find the average passenger volume in Atlanta airport, label it as “Average pasenger in ATL”, and use&lt;BR /&gt;the same format as the previous question; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;5) Find the maximum passenger volume in 2011, label it as “Max volume 2011”, and use the same format&lt;BR /&gt;as the previous question; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Question3*/
proc sql;
select avg(yr2014) as 'Average passenger in 2014' format =COMMA10.2
from passenger;
quit;

/*Question4*/
proc sql;
select avg(ATL) as Average passenger in ATL format =COMMA10.2
from passenger;
quit;

/*Question5*/
proc sql;
select max(yr2011) as Max Volume 2011 =COMMA10.2
from passenger;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class=""&gt;Output im looking for:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (1199).png" style="width: 608px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76384iF34C1BA2D51ED861/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1199).png" alt="Screenshot (1199).png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 12:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839630#M36360</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T12:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839634#M36361</link>
      <description>&lt;P&gt;Here is the error message that pops up for each of these questions:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR 22-322: Expecting a name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried using and not using quotations, here is the error for when I dont put the title in quotations:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN,&lt;/DIV&gt;&lt;DIV class=""&gt;LENGTH, TRANSCODE.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Oct 2022 12:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839634#M36361</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T12:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839638#M36362</link>
      <description>&lt;P&gt;Your SQL code is NOT trying to attach a LABEL to the variable.&amp;nbsp; Because you used the AS keyword it is trying to use a variable name that starts with a quote.&amp;nbsp; You cannot use a variable NAME that starts with a quote.&amp;nbsp; Normal variable names can only contain digits, letters and underscores and cannot start with a digit.&amp;nbsp; If your variable name does not follow those rules then you need to use a name literal in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you could correct the code many ways.&lt;/P&gt;
&lt;P&gt;First you could fix the SQL so that you are attaching a label instead.&amp;nbsp; Using one of these methods&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select max(age) 'Max Age' from sashelp.class;
select max(age) 'Max Age' as max_age from sashelp.class;
select max(age) as max_age 'Max Age' from sashelp.class;
select max(age) as max_age label='Max Age' from sashelp.class;
select max(age) as max_age label 'Max Age' from sashelp.class;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you have the VALIDVARNAME option set to ANY (and the column header you want to print is 32 bytes or less) then you could use a name literal for the variable name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select max(age) as 'Max Age'n from sashelp.class;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But since the instruction explicitly used the term LABEL I would go with one of those solutions.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 17:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839638#M36362</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-20T17:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839643#M36363</link>
      <description>&lt;P&gt;For Question 3and Question 5:&lt;/P&gt;&lt;P&gt;What should I do in order to get the commas that are produced in the intended output?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Question3*/
proc sql;
select avg(yr2014) as Average_passenger_in_2014 label = 'Average passenger in 2014' format = COMMA8.2
from passenger;
quit;

/*Question5*/
proc sql;
select max(yr2011) as Max_Volume_2011 label = 'Max Volume 2011' format = COMMA8.2
from passenger;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (1200).png" style="width: 565px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76385i95C3D4BDAF9776B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1200).png" alt="Screenshot (1200).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 13:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839643#M36363</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T13:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839644#M36364</link>
      <description>&lt;P&gt;Question 4:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should I go about this error given what this question is being asked for?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Question4*/
proc sql;
select avg(ATL) as Average_passenger_in_ATL label = 'Average passenger in ATL' format = COMMA10.2
from passenger;
quit;

Error:
 ERROR: The AVG summary function requires a numeric argument.
 ERROR: The following columns were not found in the contributing tables: ATL.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2022 13:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839644#M36364</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T13:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839656#M36365</link>
      <description>&lt;P&gt;Ive been able to fix questions 3-5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some issues now with question 6:&lt;/P&gt;&lt;P&gt;6)&amp;nbsp;&lt;SPAN class=""&gt;Concatenate the variable columns of city and state as a new variable called Location, with comma &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;separated&lt;/SPAN&gt; &lt;SPAN class=""&gt;in between, and output the variables of name, code and location only; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Question6*/
proc sql;
select*,name, code, city||","||state as Location
from passenger;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (1202).png" style="width: 559px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76388i88974C667A532C15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1202).png" alt="Screenshot (1202).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (1201).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76387i3511E6DBBDECFFF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (1201).png" alt="Screenshot (1201).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 13:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839656#M36365</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T13:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839662#M36366</link>
      <description>&lt;P&gt;You have more variables in your output because you told SQL to include ALL of the original variables by using * in the list of variables in the SELECT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I doubt that LOCATION looks as nice as that.&amp;nbsp; You should have many extra spaces before the comma.&amp;nbsp; That is because you did not remove the spaces SAS uses to fill up the CITY variable.&amp;nbsp; SAS character strings are fixed length.&amp;nbsp; Normally the trailing spaces are ignored in comparisons, but they are still there unless you do something to remove them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;trim(city)||","||state&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;personally I would add a space after the comma also.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS has a series of CAT...() functions that make it much easier.&amp;nbsp; CATX() is the one to use for this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;catx(', ',city,state)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839662#M36366</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-20T14:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839670#M36367</link>
      <description>&lt;P&gt;I was able to fix question 6 using trim. I wanted to see if question 7 looks good:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7)&amp;nbsp;&lt;SPAN class=""&gt;Read in the cargo.csv data file and output the variables in order of rank, name, code, location, year &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;from 2014 to 2011;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Cargo File:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;1 Memphis International AirportMemphis, TennesseeMEM ######## ######## ######## ########
2 Ted Stevens Anchorage International AirportAnchorage, AlaskaANC ######## ######## ######## ########
3 Louisville International AirportLouisville, KentuckySDF ######## ######## ######## ########
4 O'Hare International AirportChicago, IllinoisORD ######## ######## ######## ########
5 Miami International AirportMiami, FloridaMIA ######## ######## ######## ########
6 Indianapolis International AirportIndianapolis, IndianaIND ######## ######## ######## ########
7 Los Angeles International AirportLos Angeles, CaliforniaLAX ######## ######## ######## ########
8 Cincinnati/Northern Kentucky International AirportCincinnati, OhioCVG ######## ######## ######## ########
9 John F. Kennedy International AirportNew York, New YorkJFK ######## ######## ######## ########
10 Dallas/Fort Worth International AirportFort Worth, TexasDFW ######## ######## ######## ########&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class=""&gt;Code:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Question7*/
Data cargo;
length rank $2. name $50. location $50. code $3.;
infile '/home/u62108616/sasuser.v94/S325/cargo.csv' dlm = ','; 
input rank $ name $ location $ code $ wt2014 wt2013 wt2012 wt2011;
Format wt2014 COMMA15.0 wt2013 COMMA15.0 wt2012 COMMA15.0 wt2011 COMMA15.0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:25:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839670#M36367</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839673#M36368</link>
      <description>&lt;P&gt;For the last two questions, I was stuck on how to start:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&amp;nbsp;&lt;SPAN class=""&gt;Update the name variable by adding the airport code column aft&lt;/SPAN&gt;&lt;SPAN class=""&gt;er the first word of airport name, keep &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;a space in between. &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;9)&lt;SPAN class=""&gt;Split the location variables into two columns, city and state; output the airport name (the variable we &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;used before updating), city and state variables only. &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do we have to use merge for question 8? What does an example of this look like?&lt;/P&gt;&lt;P&gt;How do I go about writing question 9?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839673#M36368</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T14:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839680#M36369</link>
      <description>&lt;P&gt;That does not look like a CSV file.&amp;nbsp; It does not have commas between the values.&amp;nbsp; Perhaps they are using TAB as the delimiter instead?&amp;nbsp; You really should always use the DSD option when reading delimited files. And always use the TRUNCOVER option when all of the data for one observation is on one line of the text file being read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reading RANK as a character variable will not let it sort properly.&amp;nbsp; '12' will sort before '2' since it starts with the digit 1 which comes before the digit 2.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839680#M36369</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-20T14:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839694#M36370</link>
      <description>&lt;P&gt;Was able to implement those fixes for question 7. Still stuck on how to approach question 8 and question 9&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839694#M36370</guid>
      <dc:creator>JoshuaG</dc:creator>
      <dc:date>2022-10-20T15:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839850#M36394</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/432892"&gt;@JoshuaG&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I was able to fix question 6 using trim. I wanted to see if question 7 looks good:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7)&amp;nbsp;&lt;SPAN class=""&gt;Read in the cargo.csv data file and output the variables in order of rank, name, code, location, year &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;from 2014 to 2011;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Cargo File:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;1 Memphis International AirportMemphis, TennesseeMEM ######## ######## ######## ########
2 Ted Stevens Anchorage International AirportAnchorage, AlaskaANC ######## ######## ######## ########
3 Louisville International AirportLouisville, KentuckySDF ######## ######## ######## ########
4 O'Hare International AirportChicago, IllinoisORD ######## ######## ######## ########
5 Miami International AirportMiami, FloridaMIA ######## ######## ######## ########
6 Indianapolis International AirportIndianapolis, IndianaIND ######## ######## ######## ########
7 Los Angeles International AirportLos Angeles, CaliforniaLAX ######## ######## ######## ########
8 Cincinnati/Northern Kentucky International AirportCincinnati, OhioCVG ######## ######## ######## ########
9 John F. Kennedy International AirportNew York, New YorkJFK ######## ######## ######## ########
10 Dallas/Fort Worth International AirportFort Worth, TexasDFW ######## ######## ######## ########&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;/*Question7*/
Data cargo;
length rank $2. name $50. location $50. code $3.;
infile '/home/u62108616/sasuser.v94/S325/cargo.csv' dlm = ','; 
input rank $ name $ location $ code $ wt2014 wt2013 wt2012 wt2011;
Format wt2014 COMMA15.0 wt2013 COMMA15.0 wt2012 COMMA15.0 wt2011 COMMA15.0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What you show is not a csv file (no commas). The fact that all the numbers are replaced by ######## lets me suspect you did not follow my specific request to use a&amp;nbsp;&lt;STRONG&gt;TEXT EDITOR&lt;/STRONG&gt; to open the file.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 06:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Incorrect-Table/m-p/839850#M36394</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-21T06:33:40Z</dc:date>
    </item>
  </channel>
</rss>

