Report users with no assets

Josh Jayne
Tera Contributor

I am hoping someone may have a better solution to accomplish creating a report. I apologize if this is not in the correct 'location'.

I am looking to get analytical data regarding our asset management. We have around 350 active users. Each user should at the very least have 1 asset assigned.

I am trying to create a report that will show any active users that have no assigned assets. I understand that a database view would typically be used for this, however, it does not appear to generate the correct type of report. I can see all of the assets and who they are assigned to, or if not assigned, but I can't specifically see any users that have no assets.

The database view that was created is pulling from the sys_user table, order 100, variable user, no where clause, and left join is false. It is also pulling from the alm_hardware table, order 200, variable hardware, and where clause "hardware_assigned_to = user_sys_id" with a left join of true.

My end goal is to have a simple list of any user(s) that have no assets assigned to them. Can someone please point me in a better direction to accomplish a report of this type? 

1 REPLY 1

SanjivMeher
Mega Patron
Mega Patron

You need to have the left join true on the User table and left join false on the hardware. 

That way, it will generate row for all user records and if an asset not found, it will show NULL for that user.


Please mark this response as correct or helpful if it assisted you with your question.