Need help with a database view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2025 05:01 PM
I'm thinking this is not possible, because i'm hoping to get an outside join, but here we go. I'd like to create a join that shows all records in the cmdb_ci_facilities_hardware table and join with the cmdb_ci_ups_power_eq table. There is a reference field that both share (location) but that's about the only common field and to be honest it's not always filled. There's a common group in support_group that might also be used. I'm not sure how to write the "where clause" for this, though. Any suggestions? Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2025 07:26 AM
you should use single = and not == to compare
so where clause should be this
fac_location=pdu_location
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2025 05:18 PM
1. Here is the dbv form with the two tables i want to join
2. here is the first view table form (facility hardware)
3. here is the second view table form (PDU)
4. here is the error message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2025 06:17 PM
Hi @Mike Foreman ,
Update the where clause
fac_location=pdu_location
if you want to add additional filters with support_gruoup, you can do that
(assuming backend name of support group is support_group in both the tables feel free to replace it if it's different)
fac_location=pdu_location && fac_support_group = pdu_support_group
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2025 08:17 PM
you should use single = and not == to compare
so where clause should be this
fac_location=pdu_location
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