<?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: Lookup Table with SAS contains in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391605#M94099</link>
    <description>That's a really nifty solution &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; - I learn things on here everyday!</description>
    <pubDate>Tue, 29 Aug 2017 17:42:34 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-08-29T17:42:34Z</dc:date>
    <item>
      <title>Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391575#M94077</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;DIV class="vote"&gt;&lt;DIV class="favoritecount"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV&gt;&lt;DIV class="post-text"&gt;&lt;P&gt;I need to work on SAS and I'm looking for an answer maybe you can help me.&lt;/P&gt;&lt;P&gt;My table looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Table 1:
F:/Drive1/Dataset/Table1
F:/Drive2/Dataset/Table2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My second Table looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; Table 2:
 F:/Drive1
 F:/Drive2
 F:/Drive1/Dataset
 F:/Drive2/Dataset&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The Result should looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    F:/Drive1/Dataset/Table1         F:/Drive1
    F:/Drive1/Dataset/Table1         F:/Drive1/Dataset
    F:/Drive2/Dataset/Table2         F:/Drive2
    F:/Drive2/Dataset/Table2         F:/Drive2/Dataset&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the contains statement it should looks like that.&lt;/P&gt;&lt;P&gt;Any ideas ? I tried a Proc SQL left join, call execute statement.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 16:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391575#M94077</guid>
      <dc:creator>alexlor</dc:creator>
      <dc:date>2017-08-29T16:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391580#M94081</link>
      <description>&lt;P&gt;Seems pretty simple.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have1;
  input folder1 :$60. ;
cards;
F:/Drive1/Dataset/Table1
F:/Drive2/Dataset/Table2
;

data have2;
  input folder2 :$60. ;
cards;
F:/Drive1
F:/Drive2
F:/Drive1/Dataset
F:/Drive2/Dataset
;

proc sql ;
  create table want as 
    select *
    from have1, have2
    where folder1 eqt folder2
   order by 1,2
 ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 17:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391580#M94081</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-29T17:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391593#M94090</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;Sir, May i request your time to help me understand the &lt;STRONG&gt;eqt&lt;/STRONG&gt; operator plz? Many thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 17:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391593#M94090</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-08-29T17:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391598#M94093</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/69822/HTML/default/viewer.htm#n1vzpizmxns3wgn0zsxw2f1jgm0q.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/69822/HTML/default/viewer.htm#n1vzpizmxns3wgn0zsxw2f1jgm0q.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 class="xis-title"&gt;Using Truncated String Comparison Operators&lt;/H2&gt;
&lt;DIV id="p06q3b6aidviwun1uh2ctdc91d6u" class="xis-topicContent"&gt;
&lt;DIV id="p0ne8ice0t5v4zn1aqy8852xgy01" class="xis-paragraph"&gt;Truncated string comparison operators are used to compare two strings. They differ from conventional comparison operators in that, before executing the comparison, PROC&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A id="GTp0ksfz5we8tkykn174lp9yyoanxa" class="glossTerm" target="_blank"&gt;&lt;/A&gt;SQL&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;truncates the longer string to be the same length as the shorter string. The truncation is performed internally; neither operand is permanently changed. The following table lists the truncated comparison operators:&lt;/DIV&gt;
&lt;DIV id="p0nodgq78bzkk6n11om9h4jkrnem" class="xis-table"&gt;
&lt;TABLE class="tgroup"&gt;&lt;CAPTION class="xis-title"&gt;Truncated String Comparison Operators&lt;/CAPTION&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0azy1y9faqb04n1a3si2j3q8ntx" class="xis-paraTableFirst"&gt;Symbol&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1n5hyey90y6gjn19vxwqixa1ie4" class="xis-paraTableFirst"&gt;Definition&lt;/DIV&gt;
&lt;/TH&gt;
&lt;TH class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n12zea7clpqpiin18j172pj5nrzp" class="xis-paraTableFirst"&gt;Example&lt;/DIV&gt;
&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0ei7myxylgfzzn1bqaa5dlw6d77" class="xis-paraTableFirst"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;EQT&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0noyw2t6pi14rn19tgaeltlr03e" class="xis-paraTableFirst"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;equal to truncated strings&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1dn196hrn90vun1c5y8ggifcdn4" class="xis-paraTableFirst"&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&lt;CODE class="xis-codeDefaultStyle"&gt;where Name eqt 'Aust';&lt;/CODE&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0mczsclx62unzn1upm697bg8qv7" class="xis-paraTableFirst"&gt;GTT&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1k7nlk3uwsecln150llmmfgbgqx" class="xis-paraTableFirst"&gt;greater than truncated strings&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1fdbgzjqpr9o8n1msh9czdzmpar" class="xis-paraTableFirst"&gt;&lt;CODE class="xis-codeDefaultStyle"&gt;where Name gtt 'Bah';&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p075twawwtnyhun1lv6ve2r9te26" class="xis-paraTableFirst"&gt;LTT&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n1seaqj2ygjnaon1h76yhspxobf1" class="xis-paraTableFirst"&gt;less than truncated strings&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0vormztijx819n1igo7mk3vzji1" class="xis-paraTableFirst"&gt;&lt;CODE class="xis-codeDefaultStyle"&gt;where Name ltt 'An';&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0grp2hn4k2oxtn16iuciayrkfm8" class="xis-paraTableFirst"&gt;GET&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p16rgnu6dpabqjn1g9hp330wnmtu" class="xis-paraTableFirst"&gt;greater than or equal to truncated strings&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p110m1qd9kc3rhn1613q9ugtze0c" class="xis-paraTableFirst"&gt;&lt;CODE class="xis-codeDefaultStyle"&gt;where Country get 'United A';&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0f2k5pw6wn7wpn1oxv2ninmel2i" class="xis-paraTableFirst"&gt;LET&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p0kbob8lqu91nen1bzmrnb5x3o43" class="xis-paraTableFirst"&gt;less than or equal to truncated strings&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0j2q0srhgbbson1crs1ugfcn3ww" class="xis-paraTableFirst"&gt;&lt;CODE class="xis-codeDefaultStyle"&gt;where Lastname let 'Smith';&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="p01dxciw4oqtrxn1dd3k4drhfz2r" class="xis-paraTableFirst"&gt;NET&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n17s63py52cgpgn1wr3zhic3kygj" class="xis-paraTableFirst"&gt;not equal to truncated strings&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV id="n0a7xhnyu39htqn1u5f5h853gntp" class="xis-paraTableFirst"&gt;&lt;CODE class="xis-codeDefaultStyle"&gt;where Style net 'TWO';&lt;/CODE&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Aug 2017 17:35:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391598#M94093</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-29T17:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391604#M94098</link>
      <description>&lt;TABLE class="tgroup"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV class="xis-paraTableFirst" id="n130foq9zvm4lgn1bhvd44thwyat"&gt;&lt;A name="~1" target="_blank"&gt;&lt;/A&gt;&lt;FONT style="background-color: rgb(252, 222, 192);"&gt;eqt&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;TD class="xis-horizontalLeft xis-verticalTop"&gt;
&lt;DIV class="xis-paraTableFirst" id="p06kxucoc8mjvhn1fx88n4sjdmqk"&gt;equal to truncated strings (use with character operands only). &lt;SPAN class="xis-xrefSee"&gt;&lt;SPAN class="xis-xrefText"&gt;See &lt;/SPAN&gt;&lt;A title="" href="http://127.0.0.1:62738/help/sqlproc.hlp/p020urejdmvi7vn1t9avbvazqapu.htm#n0tcl9lmusfteon1entll2ua55r1" target="_blank"&gt;Truncated String Comparison Operators&lt;/A&gt;&lt;SPAN class="xis-xrefText"&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 17:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391604#M94098</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-29T17:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391605#M94099</link>
      <description>That's a really nifty solution &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; - I learn things on here everyday!</description>
      <pubDate>Tue, 29 Aug 2017 17:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391605#M94099</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-29T17:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391620#M94108</link>
      <description>&lt;P&gt;Whouah Thanks&amp;nbsp; I didn't know that&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 18:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391620#M94108</guid>
      <dc:creator>alexlor</dc:creator>
      <dc:date>2017-08-29T18:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Table with SAS contains</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391625#M94109</link>
      <description>&lt;P&gt;The T suffix on the operator names in SQL works like the : modifier that you can use in normal SAS programming.&lt;/P&gt;
&lt;P&gt;So EQT will compare for equality up to the length of the shorter string. &amp;nbsp;So 'A' eqt 'AB' returns the same results as 'A' =: 'AB' which is TRUE in both cases.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2017 18:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lookup-Table-with-SAS-contains/m-p/391625#M94109</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-08-29T18:36:15Z</dc:date>
    </item>
  </channel>
</rss>

