<?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: Proc sql select * statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324354#M271303</link>
    <description>Thanks......</description>
    <pubDate>Thu, 12 Jan 2017 17:51:43 GMT</pubDate>
    <dc:creator>a_k93</dc:creator>
    <dc:date>2017-01-12T17:51:43Z</dc:date>
    <item>
      <title>Proc sql select * statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324328#M271300</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way / options to view the output of the select * query to display column name instead of column label in the result tab (SAS University Edition)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for eg select * from sashelp.cars&lt;/P&gt;&lt;P&gt;it will return the result with the heading as&lt;/P&gt;&lt;P&gt;Make, Model, Type, Origin, DriveTrain, MSRP ,Invoice, Engine Size (L), Cylinders, Horsepower, MPG (City), MPG (Highway), Weight (LBS), Wheelbase (IN), Length (IN)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead what I am looking is something as below&lt;/P&gt;&lt;P&gt;Make, Model, Type, Origin, DriveTrain, MSRP, Invoice, EngineSize, Cylinders, Horsepower, MPG_City, MPG_Highway, Weight, Wheelbase, Length&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;a_k93&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 16:46:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324328#M271300</guid>
      <dc:creator>a_k93</dc:creator>
      <dc:date>2017-01-12T16:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql select * statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324333#M271301</link>
      <description>&lt;P&gt;Using SAS UE, while you are browsing a dataset, either in OUTPUT DATA or directly in SASHELP.anydata&lt;/P&gt;
&lt;P&gt;there is a "view" that enables chose "Column names" or "Column labels".&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 16:51:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324333#M271301</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-12T16:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql select * statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324339#M271302</link>
      <description>&lt;P&gt;While there may be an option for that, I'm not familiar with it. However, here is a way to get around that functionality:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt;&amp;nbsp; select catx(' ',name,"label=' '")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; into :labels separated by ", "&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; from dictionary.columns&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where libname='SASHELP' and&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memname="CARS"&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; select &amp;amp;labels.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from sashelp.cars&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: While the above does what the OP asked about, Roger's solution (later in this thread .. using option nolabel) is&amp;nbsp;a better solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 23:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324339#M271302</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-12T23:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql select * statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324354#M271303</link>
      <description>Thanks......</description>
      <pubDate>Thu, 12 Jan 2017 17:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324354#M271303</guid>
      <dc:creator>a_k93</dc:creator>
      <dc:date>2017-01-12T17:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql select * statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324367#M271304</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Options
  label and nolabel turns labesl off and on

data class;
 label
    age="Age hs a label"
 ;
 set sashelp.class(keep=name age);
run;quit;

proc sql;
  select
     *
  from
     class
;quit;

  Age hs
 a label  NAME
------------------
      14  Alfred
      13  Alice
      13  Barbara
      14  Carol
      14  Henry


options nolabel;


proc sql;
  select
     *
  from
     class
;quit;

     AGE  NAME
------------------
      14  Alfred
      13  Alice
      13  Barbara
      14  Carol
      14  Henry
      12  James
      12  Jane



options label;


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/324367#M271304</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-01-12T18:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql select * statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/325309#M271305</link>
      <description>Thanks Roger.... this is what I was looking for.</description>
      <pubDate>Tue, 17 Jan 2017 15:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-select-statement/m-p/325309#M271305</guid>
      <dc:creator>a_k93</dc:creator>
      <dc:date>2017-01-17T15:56:20Z</dc:date>
    </item>
  </channel>
</rss>

