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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...