<?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: Filter the underscores values using WHERE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filter-the-underscores-values-using-WHERE/m-p/606018#M175925</link>
    <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n1qcntq4r6p3w3n1mtsnm58tbomc.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;Countc Function&lt;/A&gt; like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input TBL $20.;
datalines;
INS_CON_GRP
INS_GRT
INS
H_EAL_YE_A
INS_CON_GROUP
;

data want;
   set have;
   where countc(TBL, '_') = 2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;TBL 
INS_CON_GRP 
INS_CON_GROUP &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Nov 2019 06:08:59 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-11-21T06:08:59Z</dc:date>
    <item>
      <title>Filter the underscores values using WHERE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-the-underscores-values-using-WHERE/m-p/606017#M175924</link>
      <description>&lt;P&gt;In the following list of values, I have to display the values in the Output only if the value has two underscores. I would like to tackle the condition using WHERE clause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="150"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="150"&gt;&lt;STRONG&gt;TBL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;INS_CON_GRP&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;INS_GRT&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;INS&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;H_EAL_YE_A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;INS_CON_GROUP&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desired Output is,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="141"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="141"&gt;&lt;STRONG&gt;TBL&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;INS_CON_GRP&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;INS_CON_GROUP&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 21 Nov 2019 06:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-the-underscores-values-using-WHERE/m-p/606017#M175924</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2019-11-21T06:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filter the underscores values using WHERE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-the-underscores-values-using-WHERE/m-p/606018#M175925</link>
      <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n1qcntq4r6p3w3n1mtsnm58tbomc.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;Countc Function&lt;/A&gt; like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input TBL $20.;
datalines;
INS_CON_GRP
INS_GRT
INS
H_EAL_YE_A
INS_CON_GROUP
;

data want;
   set have;
   where countc(TBL, '_') = 2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;TBL 
INS_CON_GRP 
INS_CON_GROUP &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 06:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-the-underscores-values-using-WHERE/m-p/606018#M175925</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-21T06:08:59Z</dc:date>
    </item>
  </channel>
</rss>

