<?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: display rows between 2 searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546156#M154805</link>
    <description>&lt;P&gt;On the face of it, it seems like the transaction command is the one you should be looking at&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 07:47:20 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-03-31T07:47:20Z</dc:date>
    <item>
      <title>display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546155#M154804</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;suppose I have the following entries in my file :&lt;/P&gt;&lt;P&gt;BEGIN&lt;/P&gt;&lt;P&gt;&amp;nbsp;abc&lt;/P&gt;&lt;P&gt;def&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;BEGIN&lt;/P&gt;&lt;P&gt;&amp;nbsp;xyz&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;I want to search for the sentence BEGIN and the sentence with END;&lt;/P&gt;&lt;P&gt;As a result I want to have the search entries BEGIN and END including the rows between.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dik Pater&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 07:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546155#M154804</guid>
      <dc:creator>splunkpaterd2</dc:creator>
      <dc:date>2021-03-31T07:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546156#M154805</link>
      <description>&lt;P&gt;On the face of it, it seems like the transaction command is the one you should be looking at&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 07:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546156#M154805</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-31T07:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546164#M154810</link>
      <description>&lt;P&gt;I did not succeed, so if you have the solution for me please post it.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546164#M154810</guid>
      <dc:creator>splunkpaterd2</dc:creator>
      <dc:date>2021-03-31T08:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546165#M154811</link>
      <description>&lt;P&gt;Can you post some more realistic anonymised data?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546165#M154811</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-31T08:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546352#M154875</link>
      <description>&lt;P&gt;2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 3 PROC SQL NOEXEC;&lt;BR /&gt;2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 4 SELECT t1.ID,&lt;BR /&gt;2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 5 t1.KOLOM1,&lt;BR /&gt;2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 6 t1.KOLOM2,&lt;BR /&gt;2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 7 FROM mytable t1;&lt;BR /&gt;2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 8 RUN;&lt;/P&gt;&lt;P&gt;So if I search for PROC SQL until RUN;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thats what I need to get back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dik Pater&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 10:55:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546352#M154875</guid>
      <dc:creator>splunkpaterd2</dc:creator>
      <dc:date>2021-04-01T10:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546369#M154883</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="2021-03-17T11:08:26,399 INFO [00000018] :dikpater@nowhere - 3 PROC SQL NOEXEC;
2021-03-17T11:08:26,400 INFO [00000018] :dikpater@nowhere - 4 SELECT t1.ID,
2021-03-17T11:08:26,401 INFO [00000018] :dikpater@nowhere - 5 t1.KOLOM1,
2021-03-17T11:08:26,402 INFO [00000018] :dikpater@nowhere - 6 t1.KOLOM2,
2021-03-17T11:08:26,403 INFO [00000018] :dikpater@nowhere - 7 FROM mytable t1;
2021-03-17T11:08:26,404 INFO [00000018] :dikpater@nowhere - 8 RUN;"
| multikv noheader=t
| fields - Column_1


| eval _time=strptime(_raw,"%Y-%m-%dT%H:%M:%S,%Q")

| sort - _time
| transaction startswith="PROC SQL" endswith="RUN" mvraw=t&lt;/LI-CODE&gt;&lt;P&gt;The first part sets up dummy data in line with your example&lt;/P&gt;&lt;P&gt;The second part may or may not be needed if you already have _time extracted as an epoch time&lt;/P&gt;&lt;P&gt;The transaction command needs event sorted in descending _time order&lt;/P&gt;&lt;P&gt;I used mvraw=t which may or may not be required depending on how you want to proceed&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 13:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546369#M154883</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-01T13:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: display rows between 2 searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546967#M155061</link>
      <description>&lt;P&gt;Thanks for your excellent answer .&lt;/P&gt;&lt;P&gt;My collegues are happy with this and can now continue to answer some auditing questions.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dik Pater&lt;/P&gt;&lt;P&gt;The Netherlands&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 06:04:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/display-rows-between-2-searches/m-p/546967#M155061</guid>
      <dc:creator>splunkpaterd2</dc:creator>
      <dc:date>2021-04-07T06:04:53Z</dc:date>
    </item>
  </channel>
</rss>

