Splunk Search

DBxquery help

jerinvarghese
Communicator

HI All,

I have a DB querry, need a help in date filter. 

 

| dbxquery connection="ITDW" shortnames=true  query="SELECT
GETDATE() as 'CurrentTime',
[Incident_Number],
INC.[Company],
[Customer],
PPL.Region as 'Customer_Region',
PPL.Site_Group as 'Customer_Site_Group',
PPL.Site as 'Customer_Site',
[Summary],
[Notes],
[Service],
[CI],
[Impact],
[Urgency],
[Priority],
[Incident_Type],
[Assigned_Support_Group],
[Assigned_Support_Organization],
[Status],
[Assignee],
[Status_Reason],
[Resolution],
[Reported_Date],
[Responded_Date],
[Closed_Date],
[Last_Resolved_Date],
[Submit_Date],
[Last_Modified_Date],
[Owner_Group]
FROM [shared].[ITSM_INC_MAIN] INC
LEFT OUTER JOIN [shared].[ITSM_CMDB_People_Main] PPL
ON 
INC.Customer_ID = PPL.Person_ID
WHERE (([Assigned_Support_Group] = 'Ops-WAN'))
AND [Submit_Date] BETWEEN DATEADD(D,-700,GETDATE()) AND GETDATE()"

 

I want some data which is old , filter only data that is of 2019, but when i search for more than 300 days. its not showing the accurate data.

 

how can i add a specific year or between date in the code. 

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...