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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...