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
 Transact-SQL (2000)
 Cannot see new column added to a view

Author  Topic 

miranwar
Posting Yak Master

125 Posts

Posted - 2004-01-23 : 07:13:18
Hi,

I have added an extra column to a view to return the suser_name(). However, I can only select the column when I log in as 'sa'. If I log in as a normal user. I get a message inavlid Column Name. I am droping and recrating the view using CREATE VIEW and also I AM ensuring that all permissions are set: AFter the view is created.

GRANT ALL ON zIndividualREC TO PUBLIC


Can anybody advise me on any other permissions I should be setting ?

Thanks IN ADVANCE!!!

raymondpeacock
Constraint Violating Yak Guru

367 Posts

Posted - 2004-01-23 : 07:16:26
Do you have two copies of the view owned by different users?


Raymond
Go to Top of Page

miranwar
Posting Yak Master

125 Posts

Posted - 2004-01-23 : 07:31:15
I'm Not sure How can I check ?
Go to Top of Page

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2004-01-23 : 08:14:06
Try SUSER_SNAME(), this should work.
Go to Top of Page

miranwar
Posting Yak Master

125 Posts

Posted - 2004-01-23 : 09:26:54
There seems to be two views One owned by DBO and one by an ordinary user HBO. How can I rectify the problem so there is only one view?
Go to Top of Page

raymondpeacock
Constraint Violating Yak Guru

367 Posts

Posted - 2004-01-23 : 10:02:59
Delete the one you wdon't want using EM.


Raymond
Go to Top of Page
   

- Advertisement -