OPENROWSET (DMX)
SQL Server 2012
Replaces the source data query with a query to an external provider. The INSERT, SELECT FROM PREDICTION JOIN, and SELECT FROM NATURAL PREDICTION JOIN statements support OPENROWSET.
The following example can be used within a PREDICTION JOIN statement to retrieve data from the AdventureWorksDW2012 database by using a Transact-SQL SELECT statement.
OPENROWSET ( 'SQLOLEDB.1', 'Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorksDW2012;Data Source=localhost', 'SELECT TOP 1000 * FROM vTargetMail' )
