- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2024 01:56 AM
Hi there!
We need to have a database view of all users with or without computers assigned to them (not personal equipment (so we need to filter out the personal equipment class as personal equipment table is a child of computer table)).
To do this, we joined user table with computer table, with a left join (we tried both for user and computer tables), and it didn't work.
Do you have any idea how to do this?
Thanks!
Yassine
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2024 03:49 AM
This should show you all of the users, and records from the computer table that are not on the PC extended table:
usr_sys_id=comp_assigned_to&&comp_sys_class_name!='cmdb_ci_computer'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2024 03:49 AM
This should show you all of the users, and records from the computer table that are not on the PC extended table:
usr_sys_id=comp_assigned_to&&comp_sys_class_name!='cmdb_ci_computer'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2024 01:02 AM
Thanks Brad, it worked!
Indeed, I only wanted the computers for cmdb_ci_computer table, so I remove the "!" and it worked perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2024 04:07 AM
You are welcome!