Is there such a thing as an inline macro within sql? I am not sure I am using the right terminology, but below is what I am looking for:
MACRO myRemoteTableMacro "OPENDATASOURCE('SQLNCLI','Data Source=myRemoteSvr;Integrated Security=SSPI').myDb.dbo"
select * from myRemoteTableMacro.table1
The problem is that I have a bunch of queries I am running to import data from a remote sql server into my own db and I would like not to have to repeat the connection string repeatedly for clarity's sake.
Does this exist? If there's a better way of going about this, I'm more than willing to change routes. Thanks.
MACRO myRemoteTableMacro "OPENDATASOURCE('SQLNCLI','Data Source=myRemoteSvr;Integrated Security=SSPI').myDb.dbo"
select * from myRemoteTableMacro.table1
The problem is that I have a bunch of queries I am running to import data from a remote sql server into my own db and I would like not to have to repeat the connection string repeatedly for clarity's sake.
Does this exist? If there's a better way of going about this, I'm more than willing to change routes. Thanks.