<?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: recognize and exclude sql comments in SELECT LIKE statement in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaa-p/13834675#M4865518</link>
    <description>&lt;P&gt;I guess it should also be considered that a new line ends a "--comment" or "// comment" so text in the next line up to the next comment indicator must be recognized as non-comment - which should work with according REGEXP expressions when adding '\\n', too.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 10:13:27 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2023-04-19T10:13:27Z</dc:date>
    <item>
      <title>recognize and exclude sql comments in SELECT LIKE statement</title>
      <link>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaq-p/13834673</link>
      <description>&lt;P&gt;Is it possible to look for a specific text and distinguish whether the matched text exists in a comment?&lt;/P&gt;
&lt;P&gt;Something like this:
&lt;/P&gt;&lt;PRE&gt;select 'really found' where 'select * from ABC;' like '%ABC%';
select 'found only in comments' where 'select * from mytable;--other table than ABC' like '%ABC%';
&lt;/PRE&gt;
this works, but I want to prevent this working:
&lt;PRE&gt;select 'really found' where 'select * from mytable;--other table than ABC' like '%ABC%';
select 'found only in comments' where 'select * from ABC;' like '%ABC%';
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 03:23:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaq-p/13834673</guid>
      <dc:creator>Baron</dc:creator>
      <dc:date>2023-04-19T03:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: recognize and exclude sql comments in SELECT LIKE statement</title>
      <link>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaa-p/13834674#M4865517</link>
      <description>&lt;P&gt;have you checked the REGEXP search condition to solve the match inside a comment?
Eventually using
&lt;CODE&gt;--.*?ABC.*?&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 09:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaa-p/13834674#M4865517</guid>
      <dc:creator>MCMartin</dc:creator>
      <dc:date>2023-04-19T09:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: recognize and exclude sql comments in SELECT LIKE statement</title>
      <link>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaa-p/13834675#M4865518</link>
      <description>&lt;P&gt;I guess it should also be considered that a new line ends a "--comment" or "// comment" so text in the next line up to the next comment indicator must be recognized as non-comment - which should work with according REGEXP expressions when adding '\\n', too.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 10:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/recognize-and-exclude-sql-comments-in-select-like-statement/qaa-p/13834675#M4865518</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2023-04-19T10:13:27Z</dc:date>
    </item>
  </channel>
</rss>

