<?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 Sound-LIke in data step / contains in Sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336778#M76380</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to delete the observation that does NOT contain "Card", and I am doing it in the data step. it gave me&amp;nbsp;error on the =* and delete. I am not&amp;nbsp;too sure what was wrong with it, can you&amp;nbsp;please help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can I do this in the sql step??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="4"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; want;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; acct_name &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; =* &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="4"&gt;'CARD'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="4"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; delete;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 23:07:22 GMT</pubDate>
    <dc:creator>RoWa</dc:creator>
    <dc:date>2017-02-28T23:07:22Z</dc:date>
    <item>
      <title>Sound-LIke in data step / contains in Sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336778#M76380</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to delete the observation that does NOT contain "Card", and I am doing it in the data step. it gave me&amp;nbsp;error on the =* and delete. I am not&amp;nbsp;too sure what was wrong with it, can you&amp;nbsp;please help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can I do this in the sql step??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="4"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; want;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; acct_name &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="4"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; =* &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="4"&gt;'CARD'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="4"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt; delete;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="4"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="4"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 23:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336778#M76380</guid>
      <dc:creator>RoWa</dc:creator>
      <dc:date>2017-02-28T23:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sound-LIke in data step / contains in Sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336779#M76381</link>
      <description>SQL version would be:&lt;BR /&gt;&lt;BR /&gt;Proc sql;&lt;BR /&gt;Create table want as&lt;BR /&gt;Select *&lt;BR /&gt;From have&lt;BR /&gt;Where acct_name not like '%CARD%';&lt;BR /&gt;Quit;</description>
      <pubDate>Tue, 28 Feb 2017 23:10:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336779#M76381</guid>
      <dc:creator>nehalsanghvi</dc:creator>
      <dc:date>2017-02-28T23:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sound-LIke in data step / contains in Sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336781#M76382</link>
      <description>Oops, please exclude the 'not' from the query I posted. I did the opposite above. This is what you need:&lt;BR /&gt;&lt;BR /&gt;Proc sql;&lt;BR /&gt;Create table want as&lt;BR /&gt;Select *&lt;BR /&gt;From have&lt;BR /&gt;Where acct_name like '%CARD%';&lt;BR /&gt;Quit;</description>
      <pubDate>Tue, 28 Feb 2017 23:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336781#M76382</guid>
      <dc:creator>nehalsanghvi</dc:creator>
      <dc:date>2017-02-28T23:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sound-LIke in data step / contains in Sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336784#M76383</link>
      <description>&lt;P&gt;Sounds like is a SQL operator, not a data step operator.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you could use it in a WHERE statement, use a SQL query instead or use the FIND or INDEX functions in place of it. One thing the INDEX and FIND can do is ignore case, if specified to do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 23:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336784#M76383</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-28T23:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sound-LIke in data step / contains in Sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336790#M76385</link>
      <description>&lt;P&gt;You can use the contains operator in a datastep where clause. e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
  set have (where=(acct_name contains 'CARD'));
run;
&lt;/PRE&gt;
&lt;P&gt;HTH,&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 23:27:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336790#M76385</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-28T23:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sound-LIke in data step / contains in Sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336803#M76389</link>
      <description>&lt;P&gt;While IF and WHERE are largely&amp;nbsp;interchangeable from a syntax view point, some&amp;nbsp;operators or functions can only be used in one of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WHERE can use operators such as like, contains, sounds like, or between as they come from the SQL world where WHERE clauses are used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF can use functions such as lag or vvalue or attrn as these belong firmly to the SAS world only.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 00:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sound-LIke-in-data-step-contains-in-Sql/m-p/336803#M76389</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-03-01T00:44:40Z</dc:date>
    </item>
  </channel>
</rss>

