Database view

Ramel
Mega Guru

Hi Community,

 

I created a database view between sys_audit and change_request as we need to report on those change requests that has been extended [planned start/end date have been changed], however I cannot make it to work. Anyone who can advise what is the correct where clause for this database view?

db.PNG

 

Thanks in advance.

 

Regards,

Ramel

8 REPLIES 8

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Ramel 

 

Try to reverse the tables and then check.,

*************************************************************************************************************
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]

****************************************************************************************************************

Hi @Dr Atul G- LNG ,

 

I did change it as below but still not working.db.PNG

James Chun
Kilo Patron

Hey @Ramel,

 

You should never use the Audit [sys_audit] table directly as it can cause performance degradation due to its size.

For your requirement, have you considered using Metric instead? Once you define a metric for the start/end dates, you can see how many times it was updated. 
e.g.

JamesChun_0-1709629735328.png
Refer to the doc for more info - https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/use/reporting/task/crea...

Cheers

 

@James Chun ,

 

Thank you for the suggestion. I have tried it but the problem is it only works for tickets that has been updated or newly created. We need to check on past tickets that mostly are already closed.

 

Regards,
Ramel