<?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: Searching values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917626#M361457</link>
    <description>&lt;P&gt;The request was&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Example data and work through examples with actual values shown in your example data.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see only one of the two data sets. I don't see where you have provided examples worked through so we can see what output you want.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2024 18:01:56 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-02-23T18:01:56Z</dc:date>
    <item>
      <title>Searching values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917591#M361445</link>
      <description>Hi All,&lt;BR /&gt;I’ve two tables named A &amp;amp;amp; B. In A I’ve 2 columns named Complaint, ExactReason. In B Ive 3 columns named SubCategory, Issue, Reason.&lt;BR /&gt;For complaint column it got long string values and the ExactReason is an empty column. Now i want to create a code where it takes a value from SubCategory and searches it in Complaint Column, if there’s a match and then takes a value from Issue and searches again it in Complaint, again if there’s a match and then again takes a value from Reason and searches it in Complaint column. After finding a match with all these 3 column values in Complaint column then what it should do is, it should concatenate all these 3 values into one single sentence and puts that value in the ExactReason column with the corresponding matched value of the Complaint Column. Requesting you all to help me out. Thank you very much!.</description>
      <pubDate>Fri, 23 Feb 2024 15:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917591#M361445</guid>
      <dc:creator>Vasundha</dc:creator>
      <dc:date>2024-02-23T15:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Searching values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917602#M361447</link>
      <description>&lt;P&gt;Example data and work through examples with actual values shown in your example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am afraid that text like "and searches again it in Complaint, again if there’s a match and then again takes a value from Reason and searches it in Complaint column. After finding a match with all these 3 column values in Complaint column then what it should do is, it should concatenate all these 3 values into one single sentence and puts that value in the ExactReason " it is very hard to determine what may be needed with your exact values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also not seeing clearly what is to be done if one one or two "matches" are found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you need to provide some rules and examples of the output. Since you are asking about multiple matches then ORDER of results might be an important bit and you need to provide rules for that as well.&lt;/P&gt;
&lt;P&gt;Secondary not: almost any variable that holds two or more actual values is poor data design in general and likely should be reconsidered.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 15:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917602#M361447</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-02-23T15:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Searching values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917607#M361449</link>
      <description>Thanks for responding!. Actually, I’ve only one column in B file which is Reason. For some reason, I split those values into 3 different columns to search each value separately in Complaint column.&lt;BR /&gt;&lt;BR /&gt;Subcategory&lt;BR /&gt;Water filter and chilled water dispenser.&lt;BR /&gt;Issue&lt;BR /&gt;Frozen&lt;BR /&gt;Reason&lt;BR /&gt;Manifold.&lt;BR /&gt;&lt;BR /&gt;I actually have all these words as one single sentence. What i want to achieve is. In table A column Complaint it’ll have Customer complaints. What we need to do is, I need to search this single sentence in customer complaint column. If this sentence matches with the customer complaint then we need to place this sentence in ExactReason column</description>
      <pubDate>Fri, 23 Feb 2024 16:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917607#M361449</guid>
      <dc:creator>Vasundha</dc:creator>
      <dc:date>2024-02-23T16:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Searching values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917626#M361457</link>
      <description>&lt;P&gt;The request was&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Example data and work through examples with actual values shown in your example data.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see only one of the two data sets. I don't see where you have provided examples worked through so we can see what output you want.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 18:01:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917626#M361457</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-02-23T18:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Searching values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917705#M361497</link>
      <description>&lt;P&gt;Here's the example!. I apologize for not providing detailed info also for late response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just given only one example but there are two thousand records of different complaints.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Data A;
Input complaint $100. ExactReason $50.;
Cards;
DAMAGED / MISSING PART WATER LINE 
REPLACED BROKEN WATER LINE 
;
RUN;

DATA B;
REASON $50.;
CARDS;
DOORS &amp;amp; HANDLES : DOOR / DRAWER APPEARANCE / FINISH DEFECT : MISSING / WRONG PARTS 
;
RUN;


Output;
Complaint                                                                 ExactReason  
DAMAGED / MISSING PART WATER LINE 
REPLACED BROKEN WATER LINE                                                DOORS &amp;amp; HANDLES : DOOR / 
                                                                          DRAWER APPEARANCE / FINISH DEFECT : MISSING / WRONG PARTS&lt;/PRE&gt;&lt;P&gt;Now, what I want is the value in Reason column of table B should be searched in the Complaint column of table A. If there's a match keep the value in Reason column in ExactReason column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2024 02:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-values/m-p/917705#M361497</guid>
      <dc:creator>Vasundha</dc:creator>
      <dc:date>2024-02-24T02:25:40Z</dc:date>
    </item>
  </channel>
</rss>

