Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SCHEMABINDING error while using with OPENQUERY

$
0
0

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 18
Syntax 'Openrowset/Openquery/Opendatasource' is not allowed in schema-bound objects.

Please let me know is there any workaround for this.

Thanks in advance

Raja



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>