transact_sql 中的示例访问来自某个表的数据,该表在 SQL Server 的另一个实例中。

SELECT   *
FROM      OPENDATASOURCE(
'SQLOLEDB',
'Data Source=ServerName;User ID=MyUID;Password=MyPass'
).Northwind.dbo.Categories

下面是个查询的示例,它通过用于 Jet 的 OLE DB 提供程序查询 Excel 电子表格。

SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions

相关文章:

  • 2021-04-06
  • 2021-08-12
  • 2021-10-18
  • 2021-06-30
  • 2022-12-23
  • 2021-12-11
猜你喜欢
  • 2021-11-21
  • 2021-11-23
  • 2022-12-23
  • 2022-02-05
  • 2021-07-26
  • 2021-09-01
  • 2021-08-25
相关资源
相似解决方案