Search
 
SCRIPT & CODE EXAMPLE
 

SQL

including parameters in OPENQUERY

DECLARE @TSQL varchar(8000), @VAR char(2)
SELECT  @VAR = 'CA'
SELECT  @TSQL = 'SELECT * FROM OPENQUERY(MyLinkedServer,''SELECT * FROM pubs.dbo.authors WHERE state = ''''' + @VAR + ''''''')'
EXEC (@TSQL)
Comment

PREVIOUS NEXT
Code Example
Sql :: linked server delete openquery 
Sql :: id desde sql 
Sql :: mysql count with two joins 
Sql :: power bi dax add related shows column but not working 
Sql :: how to compile a function in oracle 
Sql :: uninstall mysql centos 7 
Sql :: strat with in sql 
Sql :: sql get latest of 2 datetimes 
Sql :: sql select rows between 1000 and 2000 
Sql :: best practive to pass multiple table to stored procedure in sql server 
Sql :: delete duplicates based on 2 columns postgres 
Sql :: SOQL Child to parent 
Sql :: how to know if table in rigt or left in sql 
Sql :: SQL Manipulação de Tabelas Constraint 
Sql :: nosql databases 
Sql :: how to find median of a column sql 
Sql :: MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: mysql select all table that have field names 
Sql :: utf8_encode mysql 
Sql :: mysql storage engines 
Sql :: spark sql grows beyond 64 kb 
Csharp :: raycast from camera to mouse unity 
Csharp :: hello world program in c# 
Csharp :: unity how to set gameobjkect enabled 
Csharp :: Time delay C# unity 
Csharp :: get mouse position unity 
Csharp :: iso date format c# 
Csharp :: Change fog setting Unity 
Csharp :: c# check if string is empty 
Csharp :: unity print to console 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =