<?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: How to create a complex WHERE condition? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290501#M87809</link>
    <description>&lt;P&gt;Please don't forget to accept and upvote the answer&lt;/P&gt;</description>
    <pubDate>Mon, 26 Mar 2018 17:00:36 GMT</pubDate>
    <dc:creator>tiagofbmm</dc:creator>
    <dc:date>2018-03-26T17:00:36Z</dc:date>
    <item>
      <title>How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290496#M87804</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have to create a complex SPL command (for me ;-))&lt;BR /&gt;
In this command, I want to search a specific word which start by W10P02xx in a log file and with a date which is previous to month -2 (26 January for today)&lt;BR /&gt;
I think we have to use a WHERE condition but after???&lt;BR /&gt;
Is it possible ith SPL command?&lt;BR /&gt;
Thanks a lot&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 16:20:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290496#M87804</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-03-26T16:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290497#M87805</link>
      <description>&lt;P&gt;Hey&lt;/P&gt;

&lt;P&gt;The first part you can you &lt;CODE&gt;where yourfield like W10P02xx%&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The month part, you create a variable last_time with the function relative_time and get 2 months backwards. Then use it to filter your results with an AND&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290497#M87805</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2020-09-29T18:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290498#M87806</link>
      <description>&lt;P&gt;thanks tiago but im not sure to succeed ...........&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 16:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290498#M87806</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-03-26T16:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290499#M87807</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;Yoursearch| eval time_threshold=relative_time(now(), "-2M@d") | where yourfield like "W10P02xx%" AND _time&amp;gt;time_threshold
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Mar 2018 16:43:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290499#M87807</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-26T16:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290500#M87808</link>
      <description>&lt;P&gt;thanks tiago you are champion &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 16:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290500#M87808</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-03-26T16:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290501#M87809</link>
      <description>&lt;P&gt;Please don't forget to accept and upvote the answer&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290501#M87809</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-26T17:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a complex WHERE condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290502#M87810</link>
      <description>&lt;P&gt;You accepted your own answer. Please unaccept yours and accept my answer to the question&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 17:09:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-complex-WHERE-condition/m-p/290502#M87810</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-26T17:09:58Z</dc:date>
    </item>
  </channel>
</rss>

