Why can't I SELECT * FROM the view I just created?

Viewed 571

I created a view

CREATE VIEW BenefitsView AS SELECT * FROM Benefits

I get a message saying this ran successfully. Then I try to select everything from that view

SELECT * FROM BenefitsView 

but I'm getting a an error:

saying BenefitsView is an invalid object name?

Why? Also I've tried to find the view in the object explorer but can't?

1 Answers

Just check if u have created in correct schema and database !

If not correct it , also check permission there for logon you are executing the select statement if not run grant select to <objectName> where object name is your table name Benefits

Also grant permission must be executed from user which has rights to do that !

Related