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

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -