Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

like in openquery

DECLARE @name varchar(40), @SQL NVARCHAR(MAX)
SET @name = 'Bulbul';
SET @SQL = 'SELECT * FROM OPENQUERY(LINKSERVER, ''SELECT * FROM CONTACT WHERE FIRSTNAM LIKE ''''%' +@name+ '%'''''')';
EXEC sp_executesql @SQL;
 
PREVIOUS NEXT
Tagged: #openquery
ADD COMMENT
Topic
Name
5+9 =