We have SQL SERVER 2008 STD Edition. Im not understanding an issue. We have SQL Agent Job that sends out reports to all users.We have user categorized as Analyst,Sales Rep,Sales Rep Sub & General Users. All the Users have security levels.I created a view which has all the Users..
My question is how do i merge it with the SQL JOB or how can i alter the SQL job query to delivery reports based on security level
Analyst have security level 3, so i want groupof reports sent to them.
Alter View dbo.User_Access AS
select S.SR_name,u.SRID,sr.SRsub_name,u.SRID_SubID,U.Userid,u.username,u.Email,u.SecurityLevel,a.AnalystID from dbo.Users uleft join tbl_Analyst a on a.AnalystID=u.UserIDleft join tbl_SalesRep s on s.SRID=u.SRIDleft Join tbl_SalesRep_Sub sr on sr.SRID_SubID=u.SRID_SubID
View Complete Post