<?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: Help in Instr function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-in-Instr-function/m-p/387353#M92878</link>
    <description>&lt;P&gt;Yes, SAS implements ANSI SQL, not Oracle additional components.&lt;/P&gt;
&lt;P&gt;Your case can be re-defined but would need to see some of the data it is working on to get an idea of what you want. &amp;nbsp;I would guess at:&lt;/P&gt;
&lt;P&gt;case when index(name,name2) &amp;gt; 0 then "Y" else "N" end as survey1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the above uses a SAS function index() so wouldn't work if you pass it through to the database, however if you did that the original query would work anyways.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2017 14:34:01 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-08-11T14:34:01Z</dc:date>
    <item>
      <title>Help in Instr function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-Instr-function/m-p/387335#M92870</link>
      <description>&lt;P&gt;&lt;BR /&gt;This code works in SQL developer, but getting error in SAS&lt;BR /&gt;proc sql;&lt;BR /&gt;select&lt;BR /&gt;case WHEN Name LIKE '%' || substr(name2,instr(name2,' ',-1)+1)|| '%' then 'Y' else 'N' end as survey1&lt;BR /&gt;from x;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ERROR: Function INSTR could not be located.&lt;BR /&gt;ERROR: Expression using addition (+) requires numeric types.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 14:07:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-Instr-function/m-p/387335#M92870</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-08-11T14:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help in Instr function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-in-Instr-function/m-p/387353#M92878</link>
      <description>&lt;P&gt;Yes, SAS implements ANSI SQL, not Oracle additional components.&lt;/P&gt;
&lt;P&gt;Your case can be re-defined but would need to see some of the data it is working on to get an idea of what you want. &amp;nbsp;I would guess at:&lt;/P&gt;
&lt;P&gt;case when index(name,name2) &amp;gt; 0 then "Y" else "N" end as survey1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the above uses a SAS function index() so wouldn't work if you pass it through to the database, however if you did that the original query would work anyways.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 14:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-in-Instr-function/m-p/387353#M92878</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-08-11T14:34:01Z</dc:date>
    </item>
  </channel>
</rss>

