<?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: SAS sql steps in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826522#M326471</link>
    <description>&lt;PRE class="language-sas"&gt;&lt;CODE&gt;Difference/COL1 as diffStdErr label="Difference Std Err"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is only a query and&amp;nbsp;&lt;STRONG&gt;Difference/COL1&lt;/STRONG&gt; is a division expression and it's value will be displayed under the new column aliased as &lt;STRONG&gt;diffStdErr&lt;/STRONG&gt; but the label= assigned a label so &lt;EM&gt;Difference Std Err&lt;/EM&gt; will be in the column header of the query result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;on i = input(RowName,4.) and j = input(_LABEL_, 4.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;STRONG&gt;aCL&lt;/STRONG&gt; and &lt;STRONG&gt;aDiffT&lt;/STRONG&gt; are inner joined on the criteria based on values of column &lt;STRONG&gt;i&lt;/STRONG&gt;= converted values of &lt;STRONG&gt;RowName&lt;/STRONG&gt; and values of column&lt;STRONG&gt; j&lt;/STRONG&gt;= converted values of &lt;STRONG&gt;_LABEL_&lt;/STRONG&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Aug 2022 20:54:58 GMT</pubDate>
    <dc:creator>SuCheeTay</dc:creator>
    <dc:date>2022-08-01T20:54:58Z</dc:date>
    <item>
      <title>SAS sql steps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826440#M326445</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saw this code posted in reply to an old post. Could someone please explain the sql steps here?&lt;/P&gt;
&lt;P&gt;1) The meaning of Difference/COL1 statement?&lt;/P&gt;
&lt;P&gt;2) The inner join with i= and j= statements?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select
     aCL.*,
     Difference/COL1 as diffStdErr label="Difference Std Err"
from
     aCL inner join
     aDiffT on i = input(RowName,4.) and j = input(_LABEL_, 4.);
quit&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;FYI here is the post:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/How-to-get-standard-error-of-difference-of-ls-means-in-Proc-GLM/td-p/110510" target="_blank"&gt;Solved: How to get standard error of difference of ls-mean... - SAS Support Communities&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 13:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826440#M326445</guid>
      <dc:creator>Abishekaa</dc:creator>
      <dc:date>2022-08-01T13:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS sql steps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826443#M326447</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/102730"&gt;@Abishekaa&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saw this code posted in reply to an old post. Could someone please explain the sql steps here?&lt;/P&gt;
&lt;P&gt;1) The meaning of Difference/COL1 statement?&lt;/P&gt;
&lt;P&gt;2) The inner join with i= and j= statements?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1) That is a division operator.&amp;nbsp; The result of dividing those two variables will become the new variable diffStdErr .&lt;/P&gt;
&lt;P&gt;2) Those are equality tests.&amp;nbsp; So (i = input(RowName,4.)) will be true when the result of converting the first 4 bytes of ROWNAME into a number is a value that matches the value of the variable named I.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 14:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826443#M326447</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-08-01T14:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS sql steps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826522#M326471</link>
      <description>&lt;PRE class="language-sas"&gt;&lt;CODE&gt;Difference/COL1 as diffStdErr label="Difference Std Err"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is only a query and&amp;nbsp;&lt;STRONG&gt;Difference/COL1&lt;/STRONG&gt; is a division expression and it's value will be displayed under the new column aliased as &lt;STRONG&gt;diffStdErr&lt;/STRONG&gt; but the label= assigned a label so &lt;EM&gt;Difference Std Err&lt;/EM&gt; will be in the column header of the query result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;on i = input(RowName,4.) and j = input(_LABEL_, 4.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;STRONG&gt;aCL&lt;/STRONG&gt; and &lt;STRONG&gt;aDiffT&lt;/STRONG&gt; are inner joined on the criteria based on values of column &lt;STRONG&gt;i&lt;/STRONG&gt;= converted values of &lt;STRONG&gt;RowName&lt;/STRONG&gt; and values of column&lt;STRONG&gt; j&lt;/STRONG&gt;= converted values of &lt;STRONG&gt;_LABEL_&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 20:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-sql-steps/m-p/826522#M326471</guid>
      <dc:creator>SuCheeTay</dc:creator>
      <dc:date>2022-08-01T20:54:58Z</dc:date>
    </item>
  </channel>
</rss>

