Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Row Permissions

Author  Topic 

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-03-20 : 17:52:07
Has anyone tried/seen/experienced/done this?

I have a table that a vendor will update. They need to SELECT all rows for reporting purposes, but UPDATE only those rows that pertain to them (column=specific value). I have a dedicated user name for them to use. Sprocs are out, they're using ODBC to link to the server. (they're not too bright and I don't need them f###ing up the rest of the table accidentally :)

I thought about using SUSER_ID(), but I'm not sure it will help. I'm pretty sure a CONSTRAINT can't prevent inappropriate updates, nor DRI, so it would have to rely on a trigger. I'm thinking along the lines of: check the inserted table, if bright spark changed a row they shouldn't have, update the table with the original value from deleted.

Please feel free to smack me with a REALLY OBVIOUS answer that I overlooked, 'cause I sure feel that the answer's in front of me and I'm too lazy/stupid to see it. Thanks.

   

- Advertisement -