<?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>Question Re: search string in all procedures in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/search-string-in-all-procedures/qaa-p/13844983#M4875826</link>
    <description>&lt;P&gt;If you are concerned with identifying whitespace, you may use &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/similar-search-condition.html"&gt;SIMILAR TO&lt;/A&gt; instead of LIKE, something like (the untested):&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="k"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN class="k"&gt;source&lt;/SPAN&gt; &lt;SPAN class="k"&gt;SIMILAR&lt;/SPAN&gt; &lt;SPAN class="k"&gt;TO&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;'%INSERT INTO[[:whitespace:]]+dba.t_table%'&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;BTW: You should also make sure that the "preserve_source_format option" is set, otherwise the "source" column may be NULL. If it is not set, you can search within column "proc_defn", which will contain the code in possibly reformatted way.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2013 12:42:21 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2013-02-01T12:42:21Z</dc:date>
    <item>
      <title>search string in all procedures</title>
      <link>https://community.sap.com/t5/technology-q-a/search-string-in-all-procedures/qaq-p/13844982</link>
      <description>&lt;P&gt;I want to search a string called "Insert into dba.t_table" in all procedures on sql anywhere 12.0&lt;/P&gt;
&lt;P&gt;Currently I am using&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="n"&gt;proc_name&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="o"&gt;*&lt;/SPAN&gt; &lt;SPAN class="n"&gt;from&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sysprocedure&lt;/SPAN&gt; &lt;SPAN class="n"&gt;where&lt;/SPAN&gt; &lt;SPAN class="n"&gt;source&lt;/SPAN&gt; &lt;SPAN class="n"&gt;like&lt;/SPAN&gt; &lt;SPAN class="s"&gt;'%INSERT INTO dba.t_table%'&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;which gives only 5 rows. But sometimes we write code such as&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="n"&gt;INSERT&lt;/SPAN&gt; &lt;SPAN class="n"&gt;INTO&lt;/SPAN&gt;
   &lt;SPAN class="n"&gt;dba&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;t_table&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;So there is a whole line space after &lt;CODE&gt;INSERT INTO&lt;/CODE&gt;. So I am not sure if that will give accurate results or no. Then I tried below,&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="nb"&gt;select&lt;/SPAN&gt; &lt;SPAN class="n"&gt;proc_name&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="o"&gt;*&lt;/SPAN&gt; &lt;SPAN class="n"&gt;from&lt;/SPAN&gt; &lt;SPAN class="n"&gt;sysprocedure&lt;/SPAN&gt; &lt;SPAN class="n"&gt;where&lt;/SPAN&gt; &lt;SPAN class="n"&gt;source&lt;/SPAN&gt; &lt;SPAN class="n"&gt;like&lt;/SPAN&gt; &lt;SPAN class="s"&gt;'%dba.t_table%'&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;But this gives 95 rows. (too much)&lt;/P&gt;
&lt;P&gt;Any other easy and accurate way to search this?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2013 10:52:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/search-string-in-all-procedures/qaq-p/13844982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-01T10:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: search string in all procedures</title>
      <link>https://community.sap.com/t5/technology-q-a/search-string-in-all-procedures/qaa-p/13844983#M4875826</link>
      <description>&lt;P&gt;If you are concerned with identifying whitespace, you may use &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/similar-search-condition.html"&gt;SIMILAR TO&lt;/A&gt; instead of LIKE, something like (the untested):&lt;/P&gt;
&lt;DIV class="codehilite"&gt;&lt;PRE&gt;&lt;SPAN class="k"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN class="k"&gt;source&lt;/SPAN&gt; &lt;SPAN class="k"&gt;SIMILAR&lt;/SPAN&gt; &lt;SPAN class="k"&gt;TO&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;'%INSERT INTO[[:whitespace:]]+dba.t_table%'&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;BTW: You should also make sure that the "preserve_source_format option" is set, otherwise the "source" column may be NULL. If it is not set, you can search within column "proc_defn", which will contain the code in possibly reformatted way.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2013 12:42:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/search-string-in-all-procedures/qaa-p/13844983#M4875826</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2013-02-01T12:42:21Z</dc:date>
    </item>
  </channel>
</rss>

