- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:27 AM
Hi All,
I'm trying to create a database view to link a custom cmdb table and the case table.
When I add the cmdb table to the database view and click on 'try me' the table shows no records.
The purpose of this database view is to create a report which can look at an asset and see if there are any cases related to that asset.
Any help would be greatly appreciated
Thanks
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:48 AM - edited 01-29-2024 06:49 AM
Hi Alex
The where clause doesn't support the dot walking. You have to think about the correct condition
Something unique on the both table and write the query like below
here com is company and checking the user's company and give the correct data.
Both field should are referring to the same sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:42 AM - edited 01-29-2024 06:42 AM
Hi @Alex319 ,
Please also note the equal sign - that you have not corrected according to your update?
"ca_asset.sys_id = pp_asset.sys_id"
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:39 AM
Hi alex
You have to correct your where clause
ca_asset.sys_id = pp_asset.sys_id
Kindly consider marking the provided answer as correct if it proves helpful.
Thank you and best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:42 AM
Even with this change it is still not showing any records.
Thanks
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:46 AM
Ok, and you have an asset field on both the sn_customerservice_case and u_cmdb_ci (can't read the rest of the table name) where both entries are reference fields referring to the same sysid - is that correct? Have you verified this?
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 06:49 AM
Yeah so the asset field is on both case and cmdb table. without showing real life data you can see the same asset is visible on both.
Thanks
Alex