<?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: Using PROC SQL Filter Out data set Rows, searching one variable, that contain terms to be exclud in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682388#M206550</link>
    <description>&lt;P&gt;Thanks, both relies worked, and chose the former mainly bc it was easier to incorporate into my code , much appreciated !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Sep 2020 19:45:49 GMT</pubDate>
    <dc:creator>rmacarthur</dc:creator>
    <dc:date>2020-09-08T19:45:49Z</dc:date>
    <item>
      <title>Using PROC SQL Filter Out data set Rows, searching one variable, that contain terms to be excluded</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682309#M206526</link>
      <description>&lt;P&gt;Hi SAS Friends,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would appreciate some advice on using PROC SQL to filter out a list of excluded terms from a large dataset, am using SAS 9.4&lt;/P&gt;&lt;P&gt;In the example below, the data set COLORS contains the terms to exclude, under the variable "color".&lt;/P&gt;&lt;P&gt;The data set&amp;nbsp;Storys contains the variable "Fruit_Storys".&amp;nbsp; If a term from "color" is found in&amp;nbsp;"Fruit_Storys", need to exclude that row.&lt;/P&gt;&lt;P&gt;So in this example, the only rows that would remain after filtering :&amp;nbsp;&lt;/P&gt;&lt;P&gt;5 sour grey raisins are never chosen&lt;BR /&gt;6 sour orange raisins are sometimes chosen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example is :&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data COLORS; 
input color $20. ; 
datalines;
red delicious
purple parsimmons 
green and
blue gala
;

data Storys ;
input ID $2. Fruit_Storys $64.;
datalines ;
1 red delicious apples are the prode of NY 
2 the sweet purple parsimmons are too ripe 
3 yellow and blue gala apples are superb 
4 granny apples are green and lean 
5 sour grey raisins are never chosen 
6 sour orange raisins are sometimes chosen 
;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know this is straight forward for many of you, and hope to have that level of fluency, some day,&lt;/P&gt;&lt;P&gt;greatly appreciate your guidance,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 16:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682309#M206526</guid>
      <dc:creator>rmacarthur</dc:creator>
      <dc:date>2020-09-08T16:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC SQL Filter Out data set Rows, searching one variable, that contain terms to be exclud</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682324#M206531</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data COLORS; 
input color $20. ; 
datalines;
red delicious
purple parsimmons 
green and
blue gala
;

data Storys ;
input ID $2. Fruit_Storys $64.;
datalines ;
1 red delicious apples are the prode of NY 
2 the sweet purple parsimmons are too ripe 
3 yellow and blue gala apples are superb 
4 granny apples are green and lean 
5 sour grey raisins are never chosen 
6 sour orange raisins are sometimes chosen 
;

proc sql;
 create table want as
 select distinct id, Fruit_Storys
 from storys, colors
 group by id
 having not max(find(Fruit_Storys,strip(color)));
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Sep 2020 17:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682324#M206531</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-09-08T17:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC SQL Filter Out data set Rows, searching one variable, that contain terms to be exclud</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682341#M206537</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select *
from storys as a
where not exists (select * from colors where a.fruit_storys contains trim(color));
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Sep 2020 17:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682341#M206537</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-09-08T17:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC SQL Filter Out data set Rows, searching one variable, that contain terms to be exclud</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682388#M206550</link>
      <description>&lt;P&gt;Thanks, both relies worked, and chose the former mainly bc it was easier to incorporate into my code , much appreciated !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 19:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-SQL-Filter-Out-data-set-Rows-searching-one-variable/m-p/682388#M206550</guid>
      <dc:creator>rmacarthur</dc:creator>
      <dc:date>2020-09-08T19:45:49Z</dc:date>
    </item>
  </channel>
</rss>

