<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>鱼常游而忘飞 &#187; SQL Server</title>
	<atom:link href="http://www.oulan.com/w/tag/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oulan.com/w</link>
	<description>+++仿佛轻云应笑我--相携水岸弄朝霞--此生只为听天籁--坐拥书城看落花+++</description>
	<lastBuildDate>Fri, 23 Jul 2010 02:41:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Microsoft SQL Server 2000连接Sybase Adaptive Enterprise Server 12.5</title>
		<link>http://www.oulan.com/w/2010/06/08/microsoft-sql-server-2000-sybase-ase/</link>
		<comments>http://www.oulan.com/w/2010/06/08/microsoft-sql-server-2000-sybase-ase/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 02:32:49 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[关注]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=1983</guid>
		<description><![CDATA[一、OLE方式链接
一般的在ADO连接串生成工具中生成的串如下：
Provider=Sybase.ASEOLEDBProvider.2;Initial Catalog=数据库;Password=密码;User ID=用户名;Data Source=服务器;Extended Properties=&#8221;";Server Name=服务器;Network Protocol=Winsock;Server Port Address=端口;HA Server Name=&#8221;";HA Server Port Address=&#8221;";Character Set=&#8221;";Language=&#8221;";Application Name=&#8221;";Optimize Prepare=Partial;Select Method=Direct;Raise Error Behavior=MS Compatible;Print Statement Behavior=MS Compatible;Extended ErrorInfo=FALSE;Stored Proc Row Count=Last Statement Only;WorkStation ID=&#8221;";Row Cache Size=50;Enable Quoted Identifiers=0;Packet Size=1;Default Length For Long Data=1024;UseSybaseLDAP=False;SybaseLDAPURL=&#8221;";SybaseServerName=389;UseLDAPHAServer=0;Use SSL=0;Trusted Root File Name=&#8221;";Interfaces File=&#8221;";Interfaces File Server Name=&#8221;";EnableSPColumnTypes=True;TruncateTimeTypeFractions=1
实在是太长了。
在这篇文章中我们可以得到一个短串：
Sybase ASE OLE DB Provider Connection String
Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Provider=Sybase.ASEOLEDBProvider;Server [...]]]></description>
			<content:encoded><![CDATA[<p>一、OLE方式链接<br />
一般的在ADO连接串生成工具中生成的串如下：<br />
Provider=Sybase.ASEOLEDBProvider.2;Initial Catalog=数据库;Password=密码;User ID=用户名;Data Source=服务器;Extended Properties=&#8221;";Server Name=服务器;Network Protocol=Winsock;Server Port Address=端口;HA Server Name=&#8221;";HA Server Port Address=&#8221;";Character Set=&#8221;";Language=&#8221;";Application Name=&#8221;";Optimize Prepare=Partial;Select Method=Direct;Raise Error Behavior=MS Compatible;Print Statement Behavior=MS Compatible;Extended ErrorInfo=FALSE;Stored Proc Row Count=Last Statement Only;WorkStation ID=&#8221;";Row Cache Size=50;Enable Quoted Identifiers=0;Packet Size=1;Default Length For Long Data=1024;UseSybaseLDAP=False;SybaseLDAPURL=&#8221;";SybaseServerName=389;UseLDAPHAServer=0;Use SSL=0;Trusted Root File Name=&#8221;";Interfaces File=&#8221;";Interfaces File Server Name=&#8221;";EnableSPColumnTypes=True;TruncateTimeTypeFractions=1<br />
实在是太长了。</p>
<p>在这篇文章中我们可以得到一个短串：<br />
<a href="http://www.oulan.com/w/?B1SRHfgV">Sybase ASE OLE DB Provider Connection String</a><br />
Provider=Sybase.ASEOLEDBProvider;Srvr=myASEserver,5000;Catalog=myDataBase;User Id=myUsername;Password=myPassword;</p>
<p>Provider=Sybase.ASEOLEDBProvider;Server Name=myASEserver,5000;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;</p>
<p>更多的连接串信息可以参考<a href="http://www.oulan.com/w/?HCFWLVun"> ConnectionStrings</a><br />
二、视图方式透过访问<br />
实验内容：<br />
1. 采用查询建立的视图<br />
create view q_testtable as select * from Q.qthdsj.dbo.testtable</p>
<p>select * from Q.qthdsj.dbo.testtable</p>
<p>select * from q_testtable</p>
<p>SELECT q_testtable.a1 , q_testtable.a2 FROM q_testtable</p>
<p>select a1, a2 from q_testtable</p>
<p>存在查询返回一条的问题。就是查询应该返回多条，但实际上只返回了一条。如图：<br />
<img src="http://www.oulan.com/w/wp-content/uploads/2010/06/11.png" alt="" title="1" width="412" height="143" /></p>
<p>2. 采用openquery建立的视图<br />
create view v_testtable as<br />
select * from openquery (q,&#8217;select * from dbo.testtable&#8217;)</p>
<p>select a1, a2 from v_testtable</p>
<p>实际上，这个查询应该返回的内容非常多。如图：<br />
<img src="http://www.oulan.com/w/wp-content/uploads/2010/06/21.png" alt="" title="2" width="430" height="259" /><br />
<br />
问题解决。</p>
<p>三、结论<br />
这个问题是一个实际需要。虽然如果是我来做肯定不用这种方式。好处是显而易见的，你不需要在你的电脑上安装Sybase Client。也不需要导入导出数据。对于客户端，它还没有什么性能压力，压力只存在于Server端。坏处当然也是非常多的。首先是性能一般，甚至如果你的Server性能不怎么样的话还是不要使用了。另外，它的变态设置，以及Sybase驱动的问题影响了配置乐趣。</p>
<p>四、Sybase作为一个当年十分红火的数据库，自从将SQL Server卖出给微软之处走过的路说明，它已经风光不再。SAP的收购难言是忧是喜。因为在这个测试中，Sybase 12.5系列（虽然现在已经是15了，但是还有很多人在用12.5这个版本）的驱动显然问题很多，甚至让我对MySQL和PostgreSQL的感觉又提升了一层。没有良好商业性支持，一个又一个的版本更新也难掩垂暮的老态。多年之后，难道Sybase可言的只有Sybase PowerBuilder和PowerDesigner? 还记得当年一个Sybase的朋友说过一句“做工具，微软怎么比得上PowerBuilder”。斯是当年，今忆垂泪，唏嘘不已。</p>
<p>参考文章：<br />
1. <a href="http://www.oulan.com/w/?fwBxBgSG">Issue with Sql Server to Sybase linked server using stored procedure</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2010/06/08/microsoft-sql-server-2000-sybase-ase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>教程：如何在SQL Server中使用其它数据库</title>
		<link>http://www.oulan.com/w/2010/06/01/sql-server-other-db/</link>
		<comments>http://www.oulan.com/w/2010/06/01/sql-server-other-db/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 04:47:17 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Sybase]]></category>
		<category><![CDATA[雅奇MIS]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=1973</guid>
		<description><![CDATA[在SQL Server中使用其它数据库很简单，关键是使用安全性->链接服务器。具体设置很多网站都有就不再写了。
如果你都设置好了，请看下图：

架构一列比较重要。在SQL Server的某个数据库中要访问这个链接数据库中的表，需要这个名字。
比如
CIJXCPL..DBA.p_fp 对应的p_fp表
CIJXCPL..dbo.ml_script对应的ml_script表。
执行结果如下：

如果你需透明的访问，就是象正常的表一样访问，可以创建视图。简单的创建语句如：
CREATE VIEW V_P_FP AS SELECT * FROM CIJXCPL..DBA.p_fp
这样你就可以在开发工具的客户端看到它了。
参考：
1. 微软关于数据库连接串的帮助
2. 数据库连接字符串大全
]]></description>
			<content:encoded><![CDATA[<p>在SQL Server中使用其它数据库很简单，关键是使用安全性->链接服务器。具体设置很多网站都有就不再写了。<br />
如果你都设置好了，请看下图：<br />
<img src="http://www.oulan.com/w/wp-content/uploads/2010/06/1.png" alt="" title="1" width="784" height="618" class="alignleft size-full wp-image-1976" /><br />
架构一列比较重要。在SQL Server的某个数据库中要访问这个链接数据库中的表，需要这个名字。<br />
比如<br />
CIJXCPL..DBA.p_fp 对应的p_fp表<br />
CIJXCPL..dbo.ml_script对应的ml_script表。</p>
<p>执行结果如下：<br />
<img src="http://www.oulan.com/w/wp-content/uploads/2010/06/2.png" alt="" title="2" width="673" height="476" class="alignleft size-full wp-image-1975" /></p>
<p>如果你需透明的访问，就是象正常的表一样访问，可以创建视图。简单的创建语句如：<br />
CREATE VIEW V_P_FP AS SELECT * FROM CIJXCPL..DBA.p_fp</p>
<p>这样你就可以在开发工具的客户端看到它了。</p>
<p>参考：<br />
1. <a href="http://www.oulan.com/w/?pXZCP_Ji">微软关于数据库连接串的帮助</a><br />
2. <a href="http://www.oulan.com/w/?D4jBKo0r">数据库连接字符串大全</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2010/06/01/sql-server-other-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server中增加对其它数据库的支持</title>
		<link>http://www.oulan.com/w/2010/04/09/1794/</link>
		<comments>http://www.oulan.com/w/2010/04/09/1794/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 06:14:59 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[雅奇MIS]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=1794</guid>
		<description><![CDATA[以图为准：

连接串的格式大致如下，根据数据库不同可能不一样，但如果你用过ADO就没什么问题了。如果需要的话我可以做一个小工具帮你生成这个串。
Provider=MSDASQL.1;Password=;Persist Security Info=True;User ID=;Data Source=
想连接什么Oracle啦，MySQL的就这样动手吧。
]]></description>
			<content:encoded><![CDATA[<p>以图为准：<br />
<img src="http://www.oulan.com/w/wp-content/uploads/2010/04/1.jpg" alt="" title="SQL addserver" width="644" height="591" class="alignleft size-full wp-image-1793" /></p>
<p>连接串的格式大致如下，根据数据库不同可能不一样，但如果你用过ADO就没什么问题了。如果需要的话我可以做一个小工具帮你生成这个串。<br />
Provider=MSDASQL.1;Password=<your password>;Persist Security Info=True;User ID=</your><your user>;Data Source=</your><your datasource></your></p>
<p>想连接什么Oracle啦，MySQL的就这样动手吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2010/04/09/1794/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server链接服务器的使用方法</title>
		<link>http://www.oulan.com/w/2010/01/21/sql-server-link-server/</link>
		<comments>http://www.oulan.com/w/2010/01/21/sql-server-link-server/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 06:26:11 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=1509</guid>
		<description><![CDATA[两个参考：
1. SQL Server链接服务器的使用方法
2. SQL Server的链接服务器技术小结
]]></description>
			<content:encoded><![CDATA[<p>两个参考：<br />
1. <a href="http://www.oulan.com/w/?LUjy3itE">SQL Server链接服务器的使用方法</a><br />
2. <a href="http://www.oulan.com/w/?nc65HbvO">SQL Server的链接服务器技术小结</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2010/01/21/sql-server-link-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server,一个自定义字符串转日期函数</title>
		<link>http://www.oulan.com/w/2009/11/13/sql-server-uf_ctod/</link>
		<comments>http://www.oulan.com/w/2009/11/13/sql-server-uf_ctod/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 05:11:31 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[随笔]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=1304</guid>
		<description><![CDATA[读别人的程序能学到好多东西。好的学习，坏的学习如何改进，实在难以入目的，就引以为戒。
比如这个，日期不用datetime类型保存，用nvarchar，倒是可以，但是完全依赖系统设置在系统移植的时候真是难呐。
这两个一个是英文环境一个是中文环境的日期值：
Oct  1 2009  9:19AM
10 1 2009 9:19AM
没办法写了个函数来转：


create function uf_ctod(@datestr varchar(20))
returns datetime
as
begin
	declare @st char(2)
	declare @rd datetime
	declare @s2 char(3)
	declare @s3 varchar(20)
	declare @sf varchar(20)

	set @st = substring(@datestr, 1, 2)
	if isnumeric(@st) =1 begin
		set @rd = convert(datetime, @datestr, 109)
	end else begin
		set @s2 = substring(@datestr, 1, 3)
		set @sf = substring(@datestr, 4, len(@datestr)-3)
		select @s3 = case @s2
			when &#039;Jan&#039; then &#039;1&#039;
			when [...]]]></description>
			<content:encoded><![CDATA[<p>读别人的程序能学到好多东西。好的学习，坏的学习如何改进，实在难以入目的，就引以为戒。</p>
<p>比如这个，日期不用datetime类型保存，用nvarchar，倒是可以，但是完全依赖系统设置在系统移植的时候真是难呐。<br />
这两个一个是英文环境一个是中文环境的日期值：<br />
Oct  1 2009  9:19AM<br />
10 1 2009 9:19AM</p>
<p>没办法写了个函数来转：</p>
<pre class="brush: sql; ">

create function uf_ctod(@datestr varchar(20))
returns datetime
as
begin
	declare @st char(2)
	declare @rd datetime
	declare @s2 char(3)
	declare @s3 varchar(20)
	declare @sf varchar(20)

	set @st = substring(@datestr, 1, 2)
	if isnumeric(@st) =1 begin
		set @rd = convert(datetime, @datestr, 109)
	end else begin
		set @s2 = substring(@datestr, 1, 3)
		set @sf = substring(@datestr, 4, len(@datestr)-3)
		select @s3 = case @s2
			when &#039;Jan&#039; then &#039;1&#039;
			when &#039;Feb&#039; then &#039;2&#039;
			when &#039;Mar&#039; then &#039;3&#039;
			when &#039;Apr&#039; then &#039;4&#039;
			when &#039;May&#039; then &#039;5&#039;
			when &#039;Jun&#039; then &#039;6&#039;
			when &#039;Jul&#039; then &#039;7&#039;
			when &#039;Aug&#039; then &#039;8&#039;
			when &#039;Sep&#039; then &#039;9&#039;
			when &#039;Oct&#039; then &#039;10&#039;
			when &#039;Nov&#039; then &#039;11&#039;
			when &#039;Dec&#039; then &#039;12&#039; end
		set @sf = @s3 + @sf
		set @rd = convert(datetime, @sf, 109)
	end
	return(@rd)
end
</pre>
<p>再改进一点点：</p>
<pre class="brush: sql; ">

create function uf_c2d(@datestr varchar(20))
returns datetime
begin
	declare @rd datetime
	select @rd =
		case when isnumeric(substring(@datestr, 1, 2)) = 1 then
			convert(datetime, @datestr, 109)
		else
			case substring(@datestr, 1, 3)
				when &#039;Jan&#039; then &#039;1&#039;
				when &#039;Feb&#039; then &#039;2&#039;
				when &#039;Mar&#039; then &#039;3&#039;
				when &#039;Apr&#039; then &#039;4&#039;
				when &#039;May&#039; then &#039;5&#039;
				when &#039;Jun&#039; then &#039;6&#039;
				when &#039;Jul&#039; then &#039;7&#039;
				when &#039;Aug&#039; then &#039;8&#039;
				when &#039;Sep&#039; then &#039;9&#039;
				when &#039;Oct&#039; then &#039;10&#039;
				when &#039;Nov&#039; then &#039;11&#039;
				when &#039;Dec&#039; then &#039;12&#039;
			end + substring(@datestr, 4, len(@datestr) -3)
	end
	return(@rd)
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/11/13/sql-server-uf_ctod/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MSSQL命令行执行sql语句工具</title>
		<link>http://www.oulan.com/w/2009/11/12/mssql-osql/</link>
		<comments>http://www.oulan.com/w/2009/11/12/mssql-osql/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 01:01:40 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[关注]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[osql]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=1294</guid>
		<description><![CDATA[不会编程的人一旦学习了编程很可怕，SQL语句用不明白已经想着要在命令行下执行SQL文件了。不过这是好事。
用法: osql              [-U login id]          [-P password]
  [-S server]            [-H hostname]          [-E [...]]]></description>
			<content:encoded><![CDATA[<p>不会编程的人一旦学习了编程很可怕，SQL语句用不明白已经想着要在命令行下执行SQL文件了。不过这是好事。</p>
<p>用法: osql              [-U login id]          [-P password]<br />
  [-S server]            [-H hostname]          [-E trusted connection]<br />
  [-d use database name] [-l login timeout]     [-t query timeout]<br />
  [-h headers]           [-s colseparator]      [-w columnwidth]<br />
  [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]<br />
  [-L list servers]      [-c cmdend]            [-D ODBC DSN name]<br />
  [-q "cmdline query"]   [-Q "cmdline query" and exit]<br />
  [-n remove numbering]  [-m errorlevel]<br />
  [-r msgs to stderr]    [-V severitylevel]<br />
  [-i inputfile]         [-o outputfile]<br />
  [-p print statistics]  [-b On error batch abort]<br />
  [-O use Old ISQL behavior disables the following]<br />
      <eof> 正在进行批处理<br />
      控制台宽度自动调整<br />
      宽消息<br />
      默认错误级别为 — 1 对 1<br />
  [-? show syntax summary]</eof></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/11/12/mssql-osql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kirix™ Strata™</title>
		<link>http://www.oulan.com/w/2009/08/14/kirix%e2%84%a2-strata%e2%84%a2/</link>
		<comments>http://www.oulan.com/w/2009/08/14/kirix%e2%84%a2-strata%e2%84%a2/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 15:24:15 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[wxWidgets]]></category>
		<category><![CDATA[关注]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[软件推荐]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=738</guid>
		<description><![CDATA[Kirix™ Strata™ is an ad hoc data analysis and reporting tool built for people who work with, manipulate and analyze structured data.  Strata is easy to use, has the power you need to work with large files, and helps you get your work done faster:

Access data from anywhere (Oracle, SQL Server, CSV, XLS, EBCDIC, HTML, etc.)
Freedom from [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; font-size: 14px; line-height: 20px; color: #444444;"><a href="http://www.oulan.com/w/?b6ytamiC">Kirix™ Strata™</a> is an <strong>ad hoc data analysis and reporting tool</strong> built for people who work with, manipulate and analyze structured data.  Strata is easy to use, has the power you need to work with large files, and helps you get your work done faster:</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 20px; padding-bottom: 0px; padding-left: 30px; font-size: 14px; line-height: 20px; color: #444444;">
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; list-style-type: disc; list-style-position: initial; list-style-image: initial; font-size: 14px; line-height: 20px; color: #444444; padding: 0px;"><strong>Access data from anywhere</strong> (Oracle, SQL Server, CSV, XLS, EBCDIC, HTML, etc.)</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; list-style-type: disc; list-style-position: initial; list-style-image: initial; font-size: 14px; line-height: 20px; color: #444444; padding: 0px;"><strong>Freedom from file size limitations</strong> (60 billion rows and 18 petabytes per table)</li>
<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; list-style-type: disc; list-style-position: initial; list-style-image: initial; font-size: 14px; line-height: 20px; color: #444444; padding: 0px;"><strong>Speed, flexibility, and agility</strong> (designed for data usability, not data management)</li>
</ul>
<p>这是一个开发人员想用的工具。当然，此类工具甚多，TOAD, EMS&#8230;还有PL Developer。当然了，Kirix Strata与他们都不同。这是一个数据库分析和报告工具。支持广泛的数据库系统，比如Oracle, SQL Server, CSV等。</p>
<p>另外的关键因素是这是一个采用wxWidgets作为开发框架的工具。因此理论支持wxWidgets可以使用的平台。</p>
<p><img class="alignnone" src="http://www.kirix.com/uploads/tx_templavoila/ex_explore_new_data_01.png" alt="" width="190" height="127" /><img class="alignnone" src="http://graphics.kirix.com/screenshots/thumb-relationships.png" alt="" width="124" height="94" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/08/14/kirix%e2%84%a2-strata%e2%84%a2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL: 多表更新</title>
		<link>http://www.oulan.com/w/2009/07/18/sql-multi-table/</link>
		<comments>http://www.oulan.com/w/2009/07/18/sql-multi-table/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 03:57:06 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=423</guid>
		<description><![CDATA[update   a   inner   join   b   on   a.id=b.id   set   a.name=b.name
&#62;&#62;已经证明可以在Access与SQL Server中通用
update   a   from   b   set   a.name=b.name   where   a.id=b.id
&#62;&#62; 仅可用于SQL Server
来源：CSDN
]]></description>
			<content:encoded><![CDATA[<p>update   a   inner   join   b   on   a.id=b.id   set   a.name=b.name</p>
<p>&gt;&gt;已经证明可以在Access与SQL Server中通用</p>
<p>update   a   from   b   set   a.name=b.name   where   a.id=b.id</p>
<p>&gt;&gt; 仅可用于SQL Server</p>
<p>来源：<a href="http://www.oulan.com/w/?utbWZGhc">CSDN</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/07/18/sql-multi-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server正则表达式函数</title>
		<link>http://www.oulan.com/w/2009/07/18/sql-server-expr/</link>
		<comments>http://www.oulan.com/w/2009/07/18/sql-server-expr/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 02:22:14 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[RegExpr]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[正则表达式]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=407</guid>
		<description><![CDATA[这两天有个需求，需要在数据库中判断字符串的格式，于是从网上搜集了一些资料，整理了一下。
下面这个是一个自定义函数，用户可以调用这个函数判断指定的字符串是否符合正则表达式的规则.
CREATE FUNCTION dbo.find_regular_expression
(
@source varchar(5000),   &#8211;需要匹配的源字符串
@regexp varchar(1000),  &#8211;正则表达式
@ignorecase bit = 0  &#8211;是否区分大小写，默认为false
)
RETURNS bit  &#8211;返回结果0-false，1-true
AS
BEGIN
&#8211;0（成功）或非零数字（失败），是由 OLE 自动化对象返回的 HRESULT 的整数值。
DECLARE @hr integer
&#8211;用于保存返回的对象令牌，以便之后对该对象进行操作
DECLARE @objRegExp integer   DECLARE @objMatches integer
&#8211;保存结果
DECLARE @results bit
/*
创建 OLE 对象实例,只有 sysadmin 固定服务器角色的成员才能执行 sp_OACreate,并确定机器中有VBScript.RegExp类库
*/
EXEC @hr = sp_OACreate &#8216;VBScript.RegExp&#8217;, @objRegExp OUTPUT
IF @hr &#60;&#62; 0 BEGIN
SET @results = 0
RETURN @results
END
/*
以下三个分别是设置新建对象的三个属性。下面是&#8217;VBScript.RegExp&#8217;中常用的属性举例：
Dim regEx,Match,Matches         &#8216;建立变量。
Set regEx = New RegExp         &#8216;建立一般表达式。
regEx.Pattern= patrn         &#8216;设置模式。
regEx.IgnoreCase = [...]]]></description>
			<content:encoded><![CDATA[<p>这两天有个需求，需要在数据库中判断字符串的格式，于是从网上搜集了一些资料，整理了一下。</p>
<p>下面这个是一个自定义函数，用户可以调用这个函数判断指定的字符串是否符合正则表达式的规则.<br />
CREATE FUNCTION dbo.find_regular_expression<br />
(<br />
@source varchar(5000),   &#8211;需要匹配的源字符串<br />
@regexp varchar(1000),  &#8211;正则表达式<br />
@ignorecase bit = 0  &#8211;是否区分大小写，默认为false<br />
)<br />
RETURNS bit  &#8211;返回结果0-false，1-true<br />
AS<br />
BEGIN</p>
<p>&#8211;0（成功）或非零数字（失败），是由 OLE 自动化对象返回的 HRESULT 的整数值。<br />
DECLARE @hr integer</p>
<p>&#8211;用于保存返回的对象令牌，以便之后对该对象进行操作<br />
DECLARE @objRegExp integer   DECLARE @objMatches integer</p>
<p>&#8211;保存结果<br />
DECLARE @results bit</p>
<p>/*<br />
创建 OLE 对象实例,只有 sysadmin 固定服务器角色的成员才能执行 sp_OACreate,并确定机器中有VBScript.RegExp类库<br />
*/<br />
EXEC @hr = sp_OACreate &#8216;VBScript.RegExp&#8217;, @objRegExp OUTPUT<br />
IF @hr &lt;&gt; 0 BEGIN<br />
SET @results = 0<br />
RETURN @results<br />
END<br />
/*<br />
以下三个分别是设置新建对象的三个属性。下面是&#8217;VBScript.RegExp&#8217;中常用的属性举例：<br />
Dim regEx,Match,Matches         &#8216;建立变量。<br />
Set regEx = New RegExp         &#8216;建立一般表达式。<br />
regEx.Pattern= patrn         &#8216;设置模式。<br />
regEx.IgnoreCase = True         &#8216;设置是否区分大小写。<br />
regEx.Global=True                             &#8216;设置全局可用性。<br />
set Matches=regEx.Execute(string)             &#8216;重复匹配集合<br />
RegExpTest = regEx.Execute(strng)      &#8216;执行搜索。<br />
for each match in matches                    &#8216;重复匹配集合<br />
RetStr=RetStr &amp;&#8221;Match found at position &#8221;<br />
RetStr=RetStr&amp;Match.FirstIndex&amp;&#8221;.Match Value is &#8216;&#8221;<br />
RetStr=RetStr&amp;Match.Value&amp;&#8221;&#8216;.&#8221;&amp;vbCRLF Next<br />
RegExpTest=RetStr</p>
<p>*/<br />
EXEC @hr = sp_OASetProperty @objRegExp, &#8216;Pattern&#8217;, @regexp<br />
IF @hr &lt;&gt; 0 BEGIN<br />
SET @results = 0<br />
RETURN @results<br />
END<br />
EXEC @hr = sp_OASetProperty @objRegExp, &#8216;Global&#8217;, false<br />
IF @hr &lt;&gt; 0 BEGIN<br />
SET @results = 0<br />
RETURN @results<br />
END<br />
EXEC @hr = sp_OASetProperty @objRegExp, &#8216;IgnoreCase&#8217;, @ignorecase<br />
IF @hr &lt;&gt; 0 BEGIN<br />
SET @results = 0<br />
RETURN @results<br />
END<br />
&#8211;调用对象方法<br />
EXEC @hr = sp_OAMethod @objRegExp, &#8216;Test&#8217;, @results OUTPUT, @source<br />
IF @hr &lt;&gt; 0 BEGIN<br />
SET @results = 0<br />
RETURN @results<br />
END<br />
&#8211;释放已创建的 OLE 对象<br />
EXEC @hr = sp_OADestroy @objRegExp<br />
IF @hr &lt;&gt; 0 BEGIN<br />
SET @results = 0<br />
RETURN @results<br />
END<br />
RETURN @results<br />
END</p>
<p>下面是一个简单的测试sql语句，可以直接在查询分析器中运行。<br />
DECLARE @intLength AS INTEGER<br />
DECLARE @vchRegularExpression AS VARCHAR(50)<br />
DECLARE @vchSourceString as VARCHAR(50)<br />
DECLARE @vchSourceString2 as VARCHAR(50)<br />
DECLARE @bitHasNoSpecialCharacters as BIT</p>
<p>&#8211; 初始化变量<br />
SET @vchSourceString = &#8216;Test one This is a test!!&#8217;<br />
SET @vchSourceString2 = &#8216;Test two This is a test&#8217;</p>
<p>&#8211; 我们的正则表达式应该类似于<br />
&#8211; [a-zA-Z ]{}<br />
&#8211; 如： [a-zA-Z ]{10}  &#8230;  一个十字符的字符串</p>
<p>&#8211; 获得字符串长度<br />
SET @intLength = LEN(@vchSourceString)</p>
<p>&#8211; 设置完整的正则表达式<br />
SET @vchRegularExpression = &#8216;[a-zA-Z ]{&#8216; + CAST(@intLength as varchar) + &#8216;}&#8217;</p>
<p>&#8211; 是否有任何特殊字符<br />
SET @bitHasNoSpecialCharacters = dbo.find_regular_expression(@vchSourceString, @vchRegularExpression,0)</p>
<p>PRINT @vchSourceString<br />
IF @bitHasNoSpecialCharacters = 1 BEGIN<br />
PRINT &#8216;No special characters.&#8217;<br />
END ELSE BEGIN<br />
PRINT &#8216;Special characters found.&#8217;<br />
END</p>
<p>PRINT &#8216;**************&#8217;</p>
<p>&#8211; 获得字符串长度<br />
SET @intLength = LEN(@vchSourceString2)</p>
<p>&#8211; 设置完整的正则表达式<br />
SET @vchRegularExpression = &#8216;[a-zA-Z ]{&#8216; + CAST(@intLength as varchar) + &#8216;}&#8217;</p>
<p>&#8211; 是否有任何特殊字符<br />
SET @bitHasNoSpecialCharacters = dbo.find_regular_expression(@vchSourceString2, @vchRegularExpression,0)</p>
<p>PRINT @vchSourceString2<br />
IF @bitHasNoSpecialCharacters = 1 BEGIN<br />
PRINT &#8216;No special characters.&#8217;<br />
END ELSE BEGIN<br />
PRINT &#8216;Special characters found.&#8217;<br />
END</p>
<p>GO</p>
<p><a href="http://www.oulan.com/w/?Oox1Mhtl" target="_blank">http://blog.csdn.net/weir55/archive/2008/04/28/2337096.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/07/18/sql-server-expr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Godaddy主机消除SQL Server时差的方法</title>
		<link>http://www.oulan.com/w/2009/06/17/godday-sql-server-time-diff/</link>
		<comments>http://www.oulan.com/w/2009/06/17/godday-sql-server-time-diff/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 06:42:58 +0000</pubDate>
		<dc:creator>Ou Lanhui</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[Godaddy]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[时差]]></category>

		<guid isPermaLink="false">http://www.oulan.com/w/?p=118</guid>
		<description><![CDATA[不使用GETDATE()
使用
DATEADD(hh, 8, GETUTCDATE())
]]></description>
			<content:encoded><![CDATA[<p>不使用GETDATE()<br />
使用<br />
DATEADD(hh, 8, GETUTCDATE())</p>
]]></content:encoded>
			<wfw:commentRss>http://www.oulan.com/w/2009/06/17/godday-sql-server-time-diff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
