2 edited tags
| link
source | link

SQL Server 2008 Indexed View

I am attempting to add schemabinding to a view in SQL Server 2008, but I am getting an error of

Syntax 'Openrowset/Openquery/Opendatasource' is not allowed in schema-bound objects.

I am using Openquery because I am querying a linked server and this is the way I must query it. Is there a workaround for this?

This was the syntax I tried with my view

Create View dbo.Test
With Schemabinding

  Select * FROM OPENQUERY(, 'Select * from ls1prod.hrinfo')