Database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 02:03 AM
I have a requirement to create a Multi table report for an engagement where the columns are from Test Plan and control table. I have no experience in how to create database view for reporting purpose. Kindly assist, thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 02:14 AM
Hi @BKash
To create a Database View, you will need to follow these steps:
Navigate to the Database Views:
- In the ServiceNow application, go to System Definition > Database Views.
Create a New Database View:
- Click on New to create a new record.
- Set the Name of the Database View (for example, "Test Plan and Control Data View").
- Set the Table field to a temporary placeholder (e.g., Test Plan), as the actual database view will combine fields from different tables.
Define the Tables to Join:
After saving the Database View record, you need to define the tables you want to join.
Scroll down to the Tables related list and click New to add the tables.
Add Test Plan Table:
- Add the Test Plan table to the database view (you will need to join this with another table, e.g., Control).
Add Control Table:
- Add the Control table. This is the second table you will join with the Test Plan table.
Join the Tables:
In the Database View Tables section, specify the Join Conditions to relate records from the Test Plan table to the Control table. This is typically done by defining a common field between the tables (e.g., Test Plan ID and Control ID or some other key).
- For example:
- Test Plan Table: Test Plan ID
- Control Table: Test Plan ID (this would be the common field for the join)
- For example:
Select the appropriate Join Type (usually INNER JOIN if you only want records where there is a match in both tables).
Define the Columns to Select:
- In the Database View Columns section, add the fields (columns) you want to include in your report. For example:
- From the Test Plan table, you might want fields like Test Plan Name, Test Plan Status, etc.
- From the Control table, you might want fields like Control Name, Control Status, etc.
- In the Database View Columns section, add the fields (columns) you want to include in your report. For example:
Save the Database View.
Once the Database View is set up, you can use it as the source for your Report.
Follow below steps to create a report:
Navigate to Reports: Go to Reports > Create New.
Select the Report Type:
Select the Source:In the Source field, select the Database View you created (it will appear as a table option).
Add Columns:
Filter and Group Data:If necessary, add filters to narrow down the data (e.g., show records where Test Plan Status = Active). You can also use grouping to organize the report by certain fields (e.g., group by Test Plan Name).
Run the Report:
Save the Report:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 09:08 AM
I do not see a "Database View Tables section"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 10:40 PM
Hi @wdeich
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-06-2025 02:15 AM
database view is used to join 2 or more tables if some field is common between them
what did you start with and where are you stuck?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader