Incorrect syntax with OPENDATASOURCE in Sql server -
i stuck @ passing parameter opendatasource , got error message:
msg 102, incorrect syntax near 'sqlncli'
----@connectionstring passing ui
if exists(select cm.customerid [customer id] cardmaster cm inner join customertail ct on cm.customerid = ct.customerid inner join opendatasource(sqlncli, @connectionstring).mercfuelprod.dbo.customer cr on cm.customerid = cr.custid cm.cardnumber = @cardnumber) - begin set @result = 'success' end else
pleas me problem.
you have pass string:
opendatasource('sqlncli'...
https://msdn.microsoft.com/en-us/library/ms179856.aspx
also have dash before begin
keyword...
Comments
Post a Comment