- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 02:57 AM
Hello Developers,
I'm creating a Database view, Incident table is parent here. I'm successful fetching the data however its bit slow.
So I want to add another where clause to check incident created in this Month.
I used the query but it's not supported in Database view & got the below error.
Can anyone please suggest how to add created in this month query here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2024 05:27 AM
Hi @Dr Atul G- LNG ,
This worked for me
'inc.sys_created_on>= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)&&inc.contact_type!='Event''
Got reference from here
https://www.servicenow.com/community/developer-forum/database-view-date-parameter/m-p/1417336
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 03:02 AM
Hi @Naveen87
2nd part can be done in reporting only. Use DB view in report and get the data from report.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2024 05:27 AM
Hi @Dr Atul G- LNG ,
This worked for me
'inc.sys_created_on>= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)&&inc.contact_type!='Event''
Got reference from here
https://www.servicenow.com/community/developer-forum/database-view-date-parameter/m-p/1417336
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 07:12 AM
Good to know mate.
You can also accept my answer, as I redirected to the right way.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************