Splunk Enterprise

where command clarificaion

ips_mandar
Builder

I was working with where command like below-

 

index=abc|where (id=1ORid=2ORid=3)

 

In between  id field I have used OR operator and by mistake I haven't used space before and after OR. 
still I get same results like below query results.

 

index=abc|where (id=1 OR id=2 OR id=3)

 

so does it not matter to have space before and after OR operator?

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Experience is the best teacher.  If it works and produces the correct results then using spaces is not required, but is a good idea so the query is easier to read.

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

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Experience is the best teacher.  If it works and produces the correct results then using spaces is not required, but is a good idea so the query is easier to read.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...