SQL Query for primary users
We'd like to provide our users with a "summary page" for their Hardware Assets that shows:
Asset Name | Serial Number | HW Asset Status
Everyone should be able to ONLY view their own assets so we need to set up the condition for the HW asset primary user to be identical to the logged in user.
I'm not that skilled with SQL query writing, can anyone help me out a bit with this [i guess it's probably something trivial :) ]
We tried this one but it didn't work:
WHERE [HardwareAssetHasPrimaryUser_DisplayName] = @UserID
Without the where function it worked fine but showed everything for everyone and we don't really want that 😊
Thanks in advance!