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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...