Splunk Search

How to include quote within LIKE keyword in Dbxquery?

LearningGuy
Motivator

how to include quote within LIKE keyword in Dbxquery?
For example:    There are 10k people in the DB and I would like to query only those who contains number:123
The problem is the content has quote ".   Note I cannot filter only 123 because it will also match another record.  
name = person1
content = {"description:"test",number":123,"status":"good"}

| dbxquery connection = visibility query = "select name, content from TestDB where content like '%number":123%'

Thanks

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried escaping the quotation mark?  Just a guess.

| dbxquery connection = visibility query = "select name, content from TestDB where content like '%number\":123%'"

 

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

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

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

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...