<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>环思产品论坛 - MS-SQL</title>
    <link>http://bbs.huansi.cn/forum.php?mod=forumdisplay&amp;fid=93</link>
    <description>Latest 20 threads of MS-SQL</description>
    <copyright>Copyright(C) 环思产品论坛</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Wed, 29 Apr 2026 18:40:02 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>http://bbs.huansi.cn/static/image/common/logo_88_31.gif</url>
      <title>环思产品论坛</title>
      <link>http://bbs.huansi.cn/</link>
    </image>
    <item>
      <title>SQL数据同步工具</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=687</link>
      <description><![CDATA[SQL数据同步工具

前言
我们经常会存在将服务器A的数据，同步到服务器B中的某个数据库；本方案是通过A/B两台服务器之间建立链接服务器的方式做同步据；不适用于广域网；

业务场景：
我们需要将来源服务器 A 192.168.1.5、数据库名 HSTIIP、表名 mmMaterial 中 (物料大 ...]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Tue, 16 Jun 2020 06:08:21 +0000</pubDate>
    </item>
    <item>
      <title>数据库 SQL 优化大总结之：百万级数据库优化方案</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=647</link>
      <description><![CDATA[原稿：mp.weixin.qq.com
网上关于SQL优化的教程很多，但是比较杂乱。近日有空整理了一下，写出来跟大家分享一下，其中有错误和不足的地方，还请大家纠正补充。这篇文章我花费了大量的时间查找资料、修改、排版，希望大家阅读之后，感觉好的话推荐给更多的人，让更多的人 ...]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Sat, 27 Oct 2018 06:39:55 +0000</pubDate>
    </item>
    <item>
      <title>Update @变量 例子</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=609</link>
      <description><![CDATA[IF OBJECT_ID(\'tb\') IS NOT NULL  DROP TABLE tb
GO
CREATE TABLE tb
(
 FDate datetime ,
 FPeriod int,
 FNum int, 
 FEntryID int
)
GO
INSERT TB ( FDate, FPeriod, FNum )
SELECT \'2009-1-1\', 1, 1 union all
SELECT \'2009-1-1\', 1, 1 union all
SEL]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Wed, 14 Dec 2016 00:53:13 +0000</pubDate>
    </item>
    <item>
      <title>sqlserver 中判断是否数字，是否汉字的方法</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=606</link>
      <description><![CDATA[sqlserver 中判断是否数字，是否汉字的方法
判断字符窗中汉字个数方法（不靠谱）]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Wed, 07 Dec 2016 02:01:11 +0000</pubDate>
    </item>
    <item>
      <title>如何定义 decimal(?,?)</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=602</link>
      <description><![CDATA[如何定义 decimal(?,?)

先让我们看看不同长度的数值，占用的字节数：
查询结果：


结论：
1. 定义 decimal(1,0) 与 decimal(9,0) 后台存储数据长相同；
2. 定义 decimal(10,0) 与 decimal(19,0) 后台存储数据长相同；
3. 定义 decimal(20,0) 与 decimal(28,0) 后台存 ...]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Thu, 27 Oct 2016 15:44:58 +0000</pubDate>
    </item>
    <item>
      <title>过滤字段中文</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=601</link>
      <description><![CDATA[只查询色号表中色名此字段不含中文的记录

select * from tmColor where PATINDEX(N\'%[吖-咗]%\',sColorName) = 0]]></description>
      <category>MS-SQL</category>
      <author>huangsm</author>
      <pubDate>Thu, 27 Oct 2016 05:48:28 +0000</pubDate>
    </item>
    <item>
      <title>用WebQuery实现跨数据库查询，可替代原WebService</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=437</link>
      <description><![CDATA[1、在被访问的服务器，挂上WebQuery，最新版在服务端有日志记录功能，利于报错排查，SQL CLR要安装
2、更新sppbDIPWebQueryTable，fnpbDipWebQueryValue，sppbDIPWebQueryTable_FillDataToTempTable的脚本（DIP新DIP脚本管理中有，关键字WebQuery)
3、在需要执行访问的 ...]]></description>
      <category>MS-SQL</category>
      <author>mengxiangduo</author>
      <pubDate>Sat, 18 Jun 2016 00:49:56 +0000</pubDate>
    </item>
    <item>
      <title>将整数转换成数字字母编号</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=418</link>
      <description><![CDATA[将整数转换成数字字母编号]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Wed, 08 Jun 2016 01:46:40 +0000</pubDate>
    </item>
    <item>
      <title>SQL Server 2016新特性： Temporal table</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=417</link>
      <description><![CDATA[曾经我们遇过，误删（或更新）数据的情况，补救措施通常是还原数据库，然后把数据还原回来，整个过程比较繁琐耗时。SQL Server 2016引入了一个新的功能，即Temporaltable，我们可以称之为历史表，因为它记录了表在历史上任何时间点所做的改动。有了这个功能，一旦 ...]]></description>
      <category>MS-SQL</category>
      <author>zhouyangping</author>
      <pubDate>Wed, 08 Jun 2016 01:43:58 +0000</pubDate>
    </item>
    <item>
      <title>替换字符回车符</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=319</link>
      <description><![CDATA[替换内容所有回车符(一次替换所有)：替换内容开始位置的回车符(一次替换一个)：替换内容结束位置的回车符(一次替换一个)：]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Wed, 13 Apr 2016 04:07:15 +0000</pubDate>
    </item>
    <item>
      <title>如何启用 FILESTREAM</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=81</link>
      <description><![CDATA[在开始使用 FILESTREAM 之前，必须在 SQL Server 数据库引擎实例中启用 FILESTREAM。本主题说明了如何使用 SQL Server 配置管理器来启用 FILESTREAM。
启用和更改 FILESTREAM 设置
[*]在“开始”菜单中，依次指向“所有程序”、“Microsoft SQL Server 2008”和“配置工 ...]]></description>
      <category>MS-SQL</category>
      <author>zhouyangping</author>
      <pubDate>Tue, 03 Mar 2015 02:37:11 +0000</pubDate>
    </item>
    <item>
      <title>重建所有索引</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=68</link>
      <description><![CDATA[这个只产生重建索引的脚本，不执行。]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Mon, 22 Dec 2014 01:14:10 +0000</pubDate>
    </item>
    <item>
      <title>报表每页固定行数使用SQL分页示例</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=61</link>
      <description><![CDATA[客户要求效果


使用SQL分页]]></description>
      <category>MS-SQL</category>
      <author>zhouyangping</author>
      <pubDate>Thu, 11 Dec 2014 03:04:23 +0000</pubDate>
    </item>
    <item>
      <title>需要存储过程返回的数据集，插入到表，作为其他用途</title>
      <link>http://bbs.huansi.cn/forum.php?mod=viewthread&amp;tid=5</link>
      <description><![CDATA[需要存储过程返回的数据集，插入到表，作为其他用途，可用如下写法：
注意：过程中，必须带：
SET ANSI_NULLS ON   
SET ANSI_WARNINGS ON

调用时，需加 SET FMTONLY OFF 在执行的过程前。

原创：多多

 ...]]></description>
      <category>MS-SQL</category>
      <author>zhouf</author>
      <pubDate>Thu, 23 Oct 2014 09:16:15 +0000</pubDate>
    </item>
  </channel>
</rss>