I had a view that would restrict a users visibility of records based on their login
CREATE VIEW [dbo].[MGRTIMEVIEW] AS
SELECT
a.EMPLOYID as 'Employee ID',
a.FRSTNAME as 'First Name',
a.LASTNAME as 'Last Name',
b.YEAR1 as 'Year',
b.PERIODID as 'Pay Period',
b.TRXDATE as 'Date',
b.PAYCODE as 'Pay Code',
b.UNTSTOPY as 'Hours',
'In Process' as 'Status'
FROM UPR00100 a JOIN UPR10501 b on a.EMPLOYID = b.EMPLOYID
WHERE a.SUPERVISORCODE_I = (SELECT EMPLOYID FROM UPR00100 WHERE USERID = SYSTEM_USER)
It worked fine until the user logged in through the web client. I am guessing that SYSTEM_USER is picking up the id of the account running the web client rather than the actual user and am trying to find a solution
*This post is locked for comments