Link to home
Start Free TrialLog in
Avatar of purplesoup
purplesoupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Server row filtering based on user

Does SQL Server support row filtering based on user? This is for SQL 2000  or SQL 2005. For example a table contains a column with distinct values 'X','Y' and 'Z'. User 1 can only see rows where the column = 'X', user 2 can only see rows where the column = 'Y' and user 3 can only see rows where the column = 'Z'.

The same SQL query must be run in all cases - I don't want to create three different views for example.

So all three users would run "select * from tablename" but they would all see different results.
SOLUTION
Avatar of Daniel Wilson
Daniel Wilson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial