<?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: Contains statement can't be located in SAS EG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777145#M247209</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;

select Reason from Active where Reason contains 'opportunity';

run; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;CONTAINS isn't a function.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 01:16:05 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-10-29T01:16:05Z</dc:date>
    <item>
      <title>Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777142#M247206</link>
      <description>&lt;P&gt;I am trying to run a PROC SQL statement with a contains statement, but the log keeps saying:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Function CONTAINS could not be located.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is contains not a valid function that can be used in proc sql steps?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 00:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777142#M247206</guid>
      <dc:creator>cf8261a</dc:creator>
      <dc:date>2021-10-29T00:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777143#M247207</link>
      <description>&lt;P&gt;Posting an error message without the code that caused it leaves us guessing what you are doing. Please post the offending code.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 01:06:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777143#M247207</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-29T01:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777144#M247208</link>
      <description>&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select Reason from Active where contains(Reason, 'opportunity');&lt;/P&gt;&lt;P&gt;run; quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: Function CONTAINS could not be located.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Here is that code snippet&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 01:10:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777144#M247208</guid>
      <dc:creator>cf8261a</dc:creator>
      <dc:date>2021-10-29T01:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777145#M247209</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;

select Reason from Active where Reason contains 'opportunity';

run; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;CONTAINS isn't a function.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 01:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777145#M247209</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-29T01:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777157#M247211</link>
      <description>The FIND or INDEX function can be used in place of CONTAINS or you can fix the syntax as noted by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Oct 2021 02:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777157#M247211</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-29T02:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777169#M247215</link>
      <description>&lt;P&gt;And you can replace it by "?"：&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  select Reason from Active where Reason ? 'opportunity';
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 05:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777169#M247215</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-10-29T05:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777238#M247242</link>
      <description>&lt;P&gt;To add some context to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;reply&lt;BR /&gt;&lt;BR /&gt;The syntax&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/387902"&gt;@cf8261a&lt;/a&gt;&amp;nbsp;had for contains makes SAS think you are referring to a function (e.g. function_name(argument#1,...,&amp;nbsp;argument#n)&lt;/P&gt;
&lt;P&gt;The error message is correct "contains" is not a function it is the&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/p1xdknbejusyl6n12kqn55iahkkj.htm" target="_self"&gt;CONTAINS Operator&lt;/A&gt;&amp;nbsp;and the correct syntax is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;sql_expression&lt;/EM&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-optional"&gt;&amp;lt;NOT&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-keyword"&gt;CONTAINS&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;EM&gt;sql_expression&lt;/EM&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 11:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777238#M247242</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-10-29T11:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Contains statement can't be located in SAS EG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777355#M247293</link>
      <description>&lt;P&gt;Thank you everyone for all of the helpful comments!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 16:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Contains-statement-can-t-be-located-in-SAS-EG/m-p/777355#M247293</guid>
      <dc:creator>cf8261a</dc:creator>
      <dc:date>2021-10-29T16:39:09Z</dc:date>
    </item>
  </channel>
</rss>

