Using the import function can be much faster, but I don't know how to export the time function. Hope someone points to it. This solution references non-my features on the Internet: DECLARE @ SqlVARCHAR (1000) DECLARE @ organizationIDVARCHAR (10) SELECT @ organizationID (SELECTORGANIZATION_IDFROMMYORGSWHEREORGANIZATION_NA
Using the import function can be much faster, but I don't know how to export the time function. Hope someone points to it. This solution references non-my features on the Internet: DECLARE @ SQL VARCHAR (1000) DECLARE @ organizationID VARCHAR (10) SELECT @ organizationID = (SELECT ORGANIZATION_ID FROM MYORGS WHERE ORGANIZATION_NA
Using the import function can be much faster, but I don't know how to export the time function. Hope someone points to it. This solution is a reference to the non-self-help features on the Internet.
DECLARE @ SQL VARCHAR (1000)
DECLARE @ organizationID VARCHAR (10)
SELECT @ organizationID = (SELECT ORGANIZATION_ID from myorgs where ORGANIZATION_NAME = 'mt ')
SET @ SQL = 'select * from table name where organization_id = '+ @ organizationID
SET @ SQL = 'select * from openquery (Database Name, ''' + REPLACE (@ SQL, ''', ''') + ''')'
EXEC (@ SQL)