DB View for Reports

karthicksubrama
Tera Expert

I have a reporting requirement with a set of fields from 3 different tables for which i have created a DB view but i couldn't fetch any details. Hope there is an issue with the where clause. Kindly assist.

 

cmdb_ci

ast_contract

cmdb_software_instance

 

karthicksubrama_0-1711429257838.pngkarthicksubrama_1-1711429291952.png

karthicksubrama_2-1711429313572.png

karthicksubrama_3-1711429335813.png

karthicksubrama_0-1711429403949.png

 

 

 

1 REPLY 1

AndersBGS
Tera Patron
Tera Patron

Hi @karthicksubrama ,

 

First of all, on the ast_contract, you need to add the field con_account. According to: https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/use/reporting/concept/c...

 

"When you restrict fields, you must create a View Field record for the join field from the Where clause in the parent record. If you omit a record for this field, it cannot be returned, and the join fails."

 

Secondly, Have you though about if there should be any 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/