database view: Where clause in view ... has an invalid field or a field that is not visible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 12:41 PM - edited 07-29-2024 12:42 PM
Wish to have database view based on join between sys_audit.documentkey and cmdb_ci.sys_id fields. Error: Where clause in view u_cmdb_ci_changes has an invalid field or a field that is not visible (SA_documentkey)
I have no idea what I am doing wrong 😕
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 12:44 PM
ok, got it 😄
sa_documentkey = ci_sys_id instead of SA_documentkey = CI_sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 12:46 PM
It is not a good idea to include the sys_audit table, it is huge and is likely to cause performance problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 02:49 PM
Is it better if BR runs before query from DB view and narrows records to created on last 7 days and add additional conditions?
Ex. sa_fieldname=discovery_source^ORsa_fieldname=operational_status^sa_sys_created_onONLast 7 days@javascript:gs.beginningOfLast7Days()@javascript:gs.endOfLast7Days()