<?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: Nesting functions in 'where' in 4.3 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48064#M11472</link>
    <description>&lt;P&gt;It works in v6 but why are you lowering your match string; why not just lower it yourself like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where like(lower(Room),"%mb.1%"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Assuming that there actually &lt;EM&gt;is&lt;/EM&gt; some valid reason for needing this (e.g. you are using a $token$ for the match string), switch from SQL-type &lt;CODE&gt;like&lt;/CODE&gt; to RegEx-type &lt;CODE&gt;match&lt;/CODE&gt; and use the &lt;CODE&gt;ignorecase&lt;/CODE&gt; inline token like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where match(lower(Room),"(?i)MB.1"))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Jun 2015 21:25:11 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-06-01T21:25:11Z</dc:date>
    <item>
      <title>Nesting functions in 'where' in 4.3</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48063#M11471</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Very quick question that someone may be able to answer.&lt;/P&gt;

&lt;P&gt;In a complex form search that we have, we use the 'where' function to filter the results. So that the data is case-insensitive, we use the 'lower' function.&lt;/P&gt;

&lt;P&gt;In version 4.2.5, this syntax works fine:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;where like(lower(Room),lower("%MB.1%"))&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;('Room' is a field in the search, the other data is user entered so can vary wildly)&lt;/P&gt;

&lt;P&gt;In version 4.3, I get the error:&lt;/P&gt;

&lt;P&gt;"Error in 'where' command: The arguments to the 'like' function are invalid."&lt;/P&gt;

&lt;P&gt;Is this an error, or can we no longer nest functions?&lt;/P&gt;

&lt;P&gt;Any advice or suggestions would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Graham.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 08:23:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48063#M11471</guid>
      <dc:creator>gmor</dc:creator>
      <dc:date>2012-01-11T08:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Nesting functions in 'where' in 4.3</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48064#M11472</link>
      <description>&lt;P&gt;It works in v6 but why are you lowering your match string; why not just lower it yourself like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where like(lower(Room),"%mb.1%"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Assuming that there actually &lt;EM&gt;is&lt;/EM&gt; some valid reason for needing this (e.g. you are using a $token$ for the match string), switch from SQL-type &lt;CODE&gt;like&lt;/CODE&gt; to RegEx-type &lt;CODE&gt;match&lt;/CODE&gt; and use the &lt;CODE&gt;ignorecase&lt;/CODE&gt; inline token like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where match(lower(Room),"(?i)MB.1"))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jun 2015 21:25:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48064#M11472</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-01T21:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Nesting functions in 'where' in 4.3</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48065#M11473</link>
      <description>&lt;P&gt;Hi. Wow, this takes me back a few years...&lt;/P&gt;

&lt;P&gt;Thanks for your answer.&lt;/P&gt;

&lt;P&gt;Yes, the question did relate to the use of a $token$ in an Advanced XML View. Otherwise yes, I get that I could turn off Cap Lock and type the string in lowercase(!)&lt;/P&gt;

&lt;P&gt;But thank you for the suggestion of using the match function. I hadn't come across it before and I think it will prove useful in a number of different situations.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 06:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48065#M11473</guid>
      <dc:creator>gmor</dc:creator>
      <dc:date>2015-06-03T06:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Nesting functions in 'where' in 4.3</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48066#M11474</link>
      <description>&lt;P&gt;I am mining older unanswered questions for &lt;CODE&gt;karma&lt;/CODE&gt; so please &lt;CODE&gt;accept&lt;/CODE&gt; my answer.  I am glad it was at least educational, if it could not be useful.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 13:12:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nesting-functions-in-where-in-4-3/m-p/48066#M11474</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-03T13:12:40Z</dc:date>
    </item>
  </channel>
</rss>

