The CreatorCon Call for Content is officially open! Get started here.

Help Creating a Database view

Alex319
Giga Guru

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. 

Alex319_0-1706538315320.png

Alex319_1-1706538410557.png

Any help would be greatly appreciated

 

Thanks

Alex

 

1 ACCEPTED SOLUTION

Siddhesh Wani1
Tera Guru

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

SiddheshWani1_0-1706539662966.png

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.

 

View solution in original post

18 REPLIES 18

Siddhesh Wani1
Tera Guru

Hi Alex, 

 

Please check the where clause you written the ppa it must be pp

 

Kindly consider marking the provided answer as correct if it proves helpful.
Thank you and best regards,

Siddhesh

Hi Siddhesh, 
I have made that change, must have been a typo, but unfortunately I'm still not seeing any records. 

Alex319_0-1706539103421.png

 

AndersBGS
Tera Patron
Tera Patron

Hi @Alex319 ,

 

Your "where clause" is writting wrongly. You have written "ca_asset_sys_id.ppa_asset_sys_id", but it think it should have been "ca_asset_sys_id = pp_asset_sys_id". Please also remember of one of the tables should be a left join or not.

 

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/

Hi Anders, yeah sorry Siddhesh pointed out that typo too. unfortunately after updating I still have the same issue. 


Thanks

Alex