<?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: LEFT function in SAS-SQL creates a warning, but it's plain SQL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74567#M21645</link>
    <description>Also, the SAS LEFT function is different than other programming language LEFT function behavior and specification.  You will need to consider another approach such as using SUBSTR.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Dictionary - LEFT function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000212224.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000212224.htm&lt;/A&gt;</description>
    <pubDate>Tue, 06 Oct 2009 14:58:35 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-10-06T14:58:35Z</dc:date>
    <item>
      <title>LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74565#M21643</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've created a (SAS) SQL query, but this generate a warning ("Function LEFT requires at most 1 argument(s). The extra one(s) will be ignored."). In Management Studio the query (this part) works great, but not in SAS. Can anyone see the problem?&lt;BR /&gt;
&lt;BR /&gt;
The 'faulty' part:&lt;BR /&gt;
&lt;BR /&gt;
WHEN LEFT(MAX(Addr.ZipCode),3) IN ('101', '102') OR MAX(Addr.ProvinceName) IN ('Berlin', 'Brandenburg') THEN 'E' &lt;BR /&gt;
WHEN MAX(Addr.ProvinceName) IN ('Baden', 'Hamburg') THEN 'W' END AS RM_EW&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your answer!!&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Wouter

Message was edited by: Wouter</description>
      <pubDate>Tue, 06 Oct 2009 14:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74565#M21643</guid>
      <dc:creator>Wouter</dc:creator>
      <dc:date>2009-10-06T14:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74566#M21644</link>
      <description>Was this test?  Count your parenthesis characters in the expression below:&lt;BR /&gt;
&lt;BR /&gt;
LEFT(MAX(Addr.ZipCode)),3)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 06 Oct 2009 14:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74566#M21644</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-06T14:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74567#M21645</link>
      <description>Also, the SAS LEFT function is different than other programming language LEFT function behavior and specification.  You will need to consider another approach such as using SUBSTR.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Dictionary - LEFT function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000212224.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000212224.htm&lt;/A&gt;</description>
      <pubDate>Tue, 06 Oct 2009 14:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74567#M21645</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-06T14:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74568#M21646</link>
      <description>&amp;gt; Was this test?  Count your parenthesis characters in&lt;BR /&gt;
&amp;gt; the expression below:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; LEFT(MAX(Addr.ZipCode)),3)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Scott Barry&lt;BR /&gt;
&amp;gt; SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Hmmm... had tried some things with parenthesis, and forgot to delete one. But the warning didn't change after entering extra parenthesis. The correct version which created the warning was: LEFT(MAX(Addr.ZipCode),3) --&amp;gt; I've changed it now also in the 1st post. Thanks!&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Wouter

Message was edited by: Wouter</description>
      <pubDate>Tue, 06 Oct 2009 15:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74568#M21646</guid>
      <dc:creator>Wouter</dc:creator>
      <dc:date>2009-10-06T15:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74569#M21647</link>
      <description>&amp;gt; Also, the SAS LEFT function is different than other&lt;BR /&gt;
&amp;gt; programming language LEFT function behavior and&lt;BR /&gt;
&amp;gt; specification.  You will need to consider another&lt;BR /&gt;
&amp;gt; approach such as using SUBSTR.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Scott Barry&lt;BR /&gt;
&amp;gt; SBBWorks, Inc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; SAS Language Reference: Dictionary - LEFT function:&lt;BR /&gt;
&amp;gt; &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/626" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/626&lt;/A&gt;&lt;BR /&gt;
&amp;gt; 18/HTML/default/a000212224.htm&lt;BR /&gt;
&lt;BR /&gt;
But this is the LEFT function for DATA steps. I've wrote a SQL query (proc sql); the LEFT function should be the SQL 'version'?</description>
      <pubDate>Tue, 06 Oct 2009 15:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74569#M21647</guid>
      <dc:creator>Wouter</dc:creator>
      <dc:date>2009-10-06T15:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74570#M21648</link>
      <description>Who's SQL language should be your first question?  Like the diagnostic states, only one argument is expected for the SAS LEFT function -- regardless of whether it is PROC SQL or DATA / PROC step invocation.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 06 Oct 2009 15:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74570#M21648</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-06T15:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74571#M21649</link>
      <description>&amp;gt; Who's SQL language should be your first question?&lt;BR /&gt;
&amp;gt; Like the diagnostic states, only one argument is&lt;BR /&gt;
&amp;gt; expected for the SAS LEFT function -- regardless of&lt;BR /&gt;
&amp;gt; whether it is PROC SQL or DATA / PROC step&lt;BR /&gt;
&amp;gt;  invocation.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Scott Barry&lt;BR /&gt;
&amp;gt; SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your answer. So if I understand correctly, SQL functions called within SAS SQL like "LEFT" can have another meaning/impact?</description>
      <pubDate>Wed, 07 Oct 2009 21:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74571#M21649</guid>
      <dc:creator>Wouter</dc:creator>
      <dc:date>2009-10-07T21:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: LEFT function in SAS-SQL creates a warning, but it's plain SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74572#M21650</link>
      <description>Yes - It's somewhat (I'm stretching but it's beer:30 - sorry!) akin to the difference between "pot holder" and "roach clip" -- the first (that being LEFT) was already taken so they had to come up with another name -- the SAS function is SUBSTR.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 07 Oct 2009 21:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/LEFT-function-in-SAS-SQL-creates-a-warning-but-it-s-plain-SQL/m-p/74572#M21650</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-07T21:44:43Z</dc:date>
    </item>
  </channel>
</rss>

