I have a linked server called D20LS and trying to create a view on which pulls the data from the linked server using OpenQuery as shown.
(Environment is SQL Server 2012 and Linked Server is pointing to ODBC drivers)
create view vClaim
WITH SCHEMABINDING
as
SELECT clientid
,clientsubid
,claimnumber
FROM OpenQuery(D20LS, 'SELECT clientid, clientsubid, claimnumber FROM claim')
It is giving the error as
Msg 1054, Level 15, State 3, Procedure vClaim, Line 18Syntax 'Openrowset/Openquery/Opendatasource' is not allowed in schema-bound objects.
Please let me know is there any workaround for this.
Thanks in advance
Raja