Splunk Search

How to use IN clause in a search string?

lhumbertosplunk
New Member

Why does the following string work:

url=*string1* OR url=*mystring2*

But, this one does not work?

url in (*mystring1*, *mystring2*)

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Use IN (all caps).

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use IN (all caps).

---
If this reply helps you, Karma would be appreciated.
0 Karma

lhumbertosplunk
New Member

Unbelievable! Sucks being a newbie.

It accepted "in" as a reserved word (color change). Never crossed my mind to test "IN". Shame!

0 Karma

lhumbertosplunk
New Member

Unbelievable. It accepted "in" as a reserved word (different color in syntax).

Sucks being a newbie.

Thank you!

0 Karma
Get Updates on the Splunk Community!

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...