codebrothers.net :: Home  >  Matthias Denkmaier
User: Guest  Login
Matthias Denkmaier
C# - what else?

News:

Advertisment:

Powered by Smart|MicroBlog.NET
Blog search:  
Error 1939 when trying to create an index on View in SQL Server 2005

When you try to create an index on a column belonging to a view you receive the following error:

 

Error: sql server error 1939: The Index cannot be created because the view is not bound to a schema

 

The solution is fairly simple. You have to use the option “WITH SCHEMABINDING” when creating the view, like this:

 

CREATE VIEW [dbo].[DummyView] WITH SCHEMABINDING ...

 

Note: Some requierements have to be fulfilled before you can create a view with schema binding. Details can be found in the SQL Server Help.

 

Share this post: Email it!
Posted:  3/12/2007 11:01:14 PM  by  mdenkmaier
Tags:  SQLDevelopment
[1] comments:
Hugo Sanchez said:
Thanks a lot! You guys saved my day!
5/2/2007 7:31:36 AM
Leave a Comment

Name required

Your URL

Comments (required)