<?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 - condition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-condition/m-p/345293#M79425</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Why don't you use the same condition as in your datastep ? Here, you only take the last character of term instead of concatenating the first and last characters.&lt;BR /&gt;&lt;BR /&gt;You can also use this condition :&lt;BR /&gt;WHERE b.term like "(%)" or b.term="*";&lt;BR /&gt;</description>
    <pubDate>Wed, 29 Mar 2017 09:56:41 GMT</pubDate>
    <dc:creator>gamotte</dc:creator>
    <dc:date>2017-03-29T09:56:41Z</dc:date>
    <item>
      <title>proc sql - condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-condition/m-p/345280#M79417</link>
      <description>&lt;P&gt;i am using proc sql to join and want to use a condition something like this &amp;nbsp;which was used in datastep.&lt;/P&gt;&lt;P&gt;if mapsubmitted="Y" and (cats(substr(term,1,1),substr(term,length(term)))="()" or term="*") then do;&lt;BR /&gt;_rc=_values_.add();&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am using the below&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table _values_ as&lt;BR /&gt;select distinct b.table,b.column,b.origin,b.originwhere,b.algorithm&lt;BR /&gt;from vcol a right join source_columns b&lt;BR /&gt;on a.origin=b.origin&lt;BR /&gt;where substr(b.term,length(b.term))="()";&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;i used &lt;SPAN&gt;where substr(b.term,length(b.term))="()";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this i want to take values in term which are enclosed in "()" or which has "*".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;values in term are below. i want to take only terms which are enclosed in () and which has *.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;(MMSE)&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;(ND)&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ISO 8601&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;*&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can any one help me on this.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-condition/m-p/345280#M79417</guid>
      <dc:creator>alexdsa310</dc:creator>
      <dc:date>2017-03-29T08:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql - condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-condition/m-p/345293#M79425</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Why don't you use the same condition as in your datastep ? Here, you only take the last character of term instead of concatenating the first and last characters.&lt;BR /&gt;&lt;BR /&gt;You can also use this condition :&lt;BR /&gt;WHERE b.term like "(%)" or b.term="*";&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Mar 2017 09:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-condition/m-p/345293#M79425</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2017-03-29T09:56:41Z</dc:date>
    </item>
  </channel>
</rss>

