- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 04:57 AM
Hi,
1. After creating a database view , adding the tables you want to combine , how to define where clause?
2. How do we know which one to write where clause for??
3. For example, see the picture below,
- How to judge where to write the Where clause? as in where clause is written near the change_request and not task_sla
- Why was it written in change request where clause?
- Why did it not use change_request_sla table n used task_sla table??
Please share any article, blog or videos if you have.
Thanks,
Vaishnavi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:43 PM
Hello @vishnumaaya
Please refer below thread & videos:
Solved: Database View - ServiceNow Community
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0719186
https://www.servicenow.com/docs/csh?topicname=c_DatabaseViews.html&version=latest
https://youtu.be/_JY462TmXxU?si=2OvPCBW_Ecid4flE
https://youtu.be/vk1MYBxTSxY?si=j-Y1f0BFCdknobJT
https://youtu.be/vJo3BG2RCVc?si=Apuspc_SFU12gBbD
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 01:40 AM
Hi,
I have multiple tables added,
incident_metric, cmdb_ci_outage and u_business_unit (custom table which has markets details).
I would want Incident number column, Outage number column, Duration(Outage) column and business unit column (where the outage has occurred) . How can I write database view for this?
Thanks,
Vaishnavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2025 05:39 AM
Hi @vishnumaaya
So on this case you need to find out what is common in table and then create the where clause to get the results, You can look OOTB database view to get an idea.
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
02-27-2025 05:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:17 PM
Hi @vishnumaaya ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:43 PM
Hello @vishnumaaya
Please refer below thread & videos:
Solved: Database View - ServiceNow Community
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0719186
https://www.servicenow.com/docs/csh?topicname=c_DatabaseViews.html&version=latest
https://youtu.be/_JY462TmXxU?si=2OvPCBW_Ecid4flE
https://youtu.be/vk1MYBxTSxY?si=j-Y1f0BFCdknobJT
https://youtu.be/vJo3BG2RCVc?si=Apuspc_SFU12gBbD
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.