Topic: Way to tables as a variable
Let there is such simple SQL query. This request is launched through the server which addresses or to one to the server, or to another. But titles of databases identical on these servers. In requests the full path to tables is used.
SELECT 1; 2, 3 FROM >>> Server1. 1.dbo. <<<Tablitsa1 Tablitsa1
The selected line needs to be made as a variable.
>>> Declare @ varchar (100) = ' Server1. 1.dbo ' <<< SELECT 1; 2, 3 FROM >>> @ <<<.1 Tablitsa1
It is clear that this request not the worker.
correctly to write request?