zoukankan      html  css  js  c++  java
  • Sql Server 简单查询 异步服务器更新语句

    //结构:select 子句 [into 子句] from 子句  [where 子句] [group by 子句]  [having 子句] [order by 子句]

    select  dept_code,count(*) from oh_corp_info
    where create_date>'2006-01-01'
    group by dept_code having count(dept_code)>1  order by dept_code

    //查询前百分之N的数据

    select  top 10 percent  *  from oh_corp_info

    //查询语句between用法

    select * from oh_corp_info where create_date between '2012-01-02' and '2012-03-01'

    //异步服务器获取数据并且插入新表

    insert into dbo.assess_company_project_v(a,b,c)
    select a,b,c  from opendatasource ('SQLOLEDB','Data Source=IP地址(例192.168.5.117);User ID=服务器;Password=123456;').newcq.dbo.assess_company_project_v

    //打开异步服务器连接

    [sql] view plaincopy
    01.exec sp_configure 'show advanced options',1 
    02.reconfigure 
    03.exec sp_configure 'Ad Hoc Distributed Queries',1 
    04.reconfigure

    //使用完成后,关闭Ad Hoc Distributed Queries:

    [sql] view plaincopy
    01.exec sp_configure 'Ad Hoc Distributed Queries',0 
    02.reconfigure 
    03.exec sp_configure 'show advanced options',0 
    04.reconfigure

    生活不是用眼泪博得同情 而是用汗水赢得掌声
  • 相关阅读:
    Java实现OPC通信
    OPCServer:使用KEPServer
    OPCServer:使用Matrikon OPC Server Simulation
    OPC和DCOM配置
    jquery中attr和prop的区别
    jquery 操作checkbox是否选中的正确方法
    GPRS RTU设备OPC Server接口C# 实现
    Raspberry Pi 中安装Mono
    C#中DllImport用法汇总
    HTML <form> 标签的 method 属性
  • 原文地址:https://www.cnblogs.com/tutuyforever/p/3200118.html
Copyright © 2011-2022 走看看