Splunk Dev

DB Input with two raising columns

splunkrocks2014
Communicator

I have a SQL query pull relied on two raising columns (see below). In DB input, is it possible to set two raise columns? I am using DB Connect 3.1.4.

SELECT *
FROM table_1
WHERE (timestamp > ? AND logoff_time IS NULL) OR logoff_time> ?
ORDER BY timestamp, logoff_time
Tags (1)
0 Karma

maciep
Champion

Maybe use a case in your where clause

 SELECT *
 FROM table_1
 WHERE (case when [logoff_time] is NULL then [timestamp] else [logoff_time] end) > ?
 ORDER BY timestamp, logoff_time
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...