LinkServer的语法

来源:互联网 发布:淘宝号怎样实名认证 编辑:程序博客网 时间:2024/05/13 21:11
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

近日,因项目需要通过配置文件从一台dw以及一台SQLSERVER2005的服务器中每天定时查询数据并且将所查询数据写回项目中所创建的中的几个表中,今天稍微整理了一下:

1.Oracle

SELECT*FROMOPENQUERY('LinkServerName','查询语句')

这就是一条简单的SQL语句

查询语句可以是这样:

SELECT*FROM用户名(schema).表名where……

(注:需要注意schema哦,这是Oracle与SQL不一样的地方)

2.SQL

SELECT*FROMLinkServerName.数据库名.dbo.表名


呵呵,语法懂了后,其余的delete,insert,update其实就小菜一碟了·

转自:动态制作指南|www.acnow.net

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击