SQL Server 2000General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
When I give user1 permission to view column1 and column2 and user2 to view also column3 - via Enterprise Manager at MS SQL database and then I create report that asks for usernames and contains all three fields - in first case it returns error, that user1 has a denied access to column3.
That is....logical.
However - how can I make one report for all users that would just hide the "denied" fields instead of trying to show them and yield error?
[quote]Originally posted by Hal Levy
You would need to use different sql statements-- based on the user rights.. (this can be done conditionally in a SP).
Can you give me an example in SQL considering the signed-in user?