Building for the Splunk Platform

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!

Streamline Data Ingestion With Deployment Server Essentials

REGISTER NOW!Every day the list of sources Admins are responsible for gets bigger and bigger, often making the ...

Remediate Threats Faster and Simplify Investigations With Splunk Enterprise Security ...

REGISTER NOW!Join us for a Tech Talk around our latest release of Splunk Enterprise Security 7.2! We’ll walk ...

Introduction to Splunk AI

WATCH NOWHow are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. ...