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.
| Author |
Topic |
|
danielhai
Yak Posting Veteran
50 Posts |
Posted - 2002-11-05 : 16:34:24
|
| I'm having putting an index on a view, i did a simple join on a table, with an ID that will be the unique cluster. However, after I bind the schema, and try to attach the index, it says: cannot create view vw_XXX. It contains one or more disalloed constructs.It's a rather simple select in the view:CREATE VIEW dbo.vw_ContactWITH SCHEMABINDING ASSELECT DISTINCT c.ContactID, c.FirstName, c.LastName, c.Title, o.OrganizationNameFROM dbo.Contact c LEFT OUTER JOIN dbo.Organization o ON o.OrganizationID = c.OrganizationIDWHERE (c.Deleted = 0)something i'm doing wrong here? |
|
|
izaltsman
A custom title
1139 Posts |
Posted - 2002-11-05 : 16:39:07
|
| I believe that using DISTINCT is not allowed when you are creating indexed views.Edited by - izaltsman on 11/05/2002 16:42:00 |
 |
|
|
|
|
|