Splunk Search

Help on where condition which doesn't works

jip31
Motivator

Hello

The search below returns results but the where condition doesnt works

 

`wire` 
| eval USERNAME=upper(USERNAME) 
| lookup aps.csv NAME as AP_NAME OUTPUT Building 
| lookup lookup_cmdb_fo_all HOSTNAME as USERNAME output BUILDING_CODE 
| eval Building=upper(Building) 
| stats last(Building) as "GB", last(BUILDING_CODE) as "SB" by USERNAME 
| where NOT ('GB' = 'SB')

 

I have tried many things

 

| where NOT ('GB' = 'SB')
| where NOT like ('GB','SB')
| where NOT ("GB"="SB")

 

what is the pb please?

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried | where NOT GB=SB or | where GB!=SB?

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

jip31
Motivator

with where GB!=SB I have GB events equal SB events and GB events different from GB events and I also tried with | where NOT GB!=SB. And in this case I have just events where GB = SB!

0 Karma
Get Updates on the Splunk Community!

Unlock Instant Security Insights from Amazon S3 with Splunk Cloud — Try Federated ...

Availability: Must be on Splunk Cloud Platform version 10.1.2507.x to view the free trial banner. If you are ...

What's New in Splunk Observability - November 2025

What's New We’re excited to announce the latest enhancements to Splunk Observability Cloud and ...

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...