<?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 - Creating lables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425274#M104741</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;The OP's code did not create a table so there wasn't a table to assign a permanent label to the variable.&amp;nbsp;It assigned a&amp;nbsp;label to the variable in the output to the results window for a select.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; select sex label='Gender Label'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; from sashelp.class;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Won't change the label in sashelp.class which may be the OP intent. May, that's why I asked for clarification of intent.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jan 2018 16:14:46 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-01-05T16:14:46Z</dc:date>
    <item>
      <title>proc sql - Creating lables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425061#M104687</link>
      <description>&lt;P&gt;i want to create labels for a dataset&amp;nbsp; using proc sql.&lt;/P&gt;&lt;P&gt;i used the code&lt;/P&gt;&lt;PRE&gt;proc sql; 
select PRODUCT_ID label="Line number" 
from a6.SMB;
quit;&lt;/PRE&gt;&lt;P&gt;but in the result the column name product_id is changed to line number.&lt;/P&gt;&lt;P&gt;In the original smb data-set the label has not been modified .&lt;/P&gt;&lt;P&gt;Why is it not working ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 21:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425061#M104687</guid>
      <dc:creator>riya275</dc:creator>
      <dc:date>2018-01-04T21:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - Creating lables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425062#M104688</link>
      <description>&lt;P&gt;You didn't create a table, you only displayed results and they default to the Labels in presentation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a data set, add a CREATE TABLE statement and then you can check the the variable name and label are different. If you'd like to apply a label to an already created data step and cannot back up to do so in another data step or proc sql, you can use PROC DATASETS to modify the library.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 21:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425062#M104688</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-04T21:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - Creating lables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425065#M104689</link>
      <description>&lt;P&gt;By table do you mean a "report table" or "a newly created dataset for further use" or "an existing dataset"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code created a report table in the results. It did not create a data set or modify an existing one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Datasets is the preferred way to modify existing data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc datasets library = a6;
   modify SMB;
     label Product_id = "Line Number";
quit;&lt;/PRE&gt;
&lt;P&gt;There are options to suppress some of the information you'll get when running the procedure such as NODETAILS, NOLIST and/or NOPRINT&amp;nbsp;on the procedure statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 21:57:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425065#M104689</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-04T21:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - Creating lables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425066#M104690</link>
      <description>&lt;P&gt;Are you sure? My test has yielded the expected results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select sex label="gender"&lt;BR /&gt;from sashelp.class;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc contents;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc contents --&amp;gt;SAS Output&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Alphabetic List of Variables and Attributes# Variable Type Len Label1 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;gender&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Jan 2018 22:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425066#M104690</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-04T22:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - Creating lables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425274#M104741</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;The OP's code did not create a table so there wasn't a table to assign a permanent label to the variable.&amp;nbsp;It assigned a&amp;nbsp;label to the variable in the output to the results window for a select.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; select sex label='Gender Label'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; from sashelp.class;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Won't change the label in sashelp.class which may be the OP intent. May, that's why I asked for clarification of intent.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 16:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-Creating-lables/m-p/425274#M104741</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-05T16:14:46Z</dc:date>
    </item>
  </channel>
</rss>

