<?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</title>
	<atom:link href="http://www.thtznet.com/tag/sql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thtznet.com</link>
	<description></description>
	<lastBuildDate>Wed, 23 Jun 2010 12:36:02 +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>mssql学习笔记：检索表</title>
		<link>http://www.thtznet.com/124.html</link>
		<comments>http://www.thtznet.com/124.html#comments</comments>
		<pubDate>Sun, 13 Jun 2010 05:43:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[金蝶技术]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.thtznet.com/?p=124</guid>
		<description><![CDATA[select * from T_Debt
&#8211;检索T_Debt表返回所有的数据,负载大
select FNumber,FPerson from T_Debt
&#8211;检索T_Debt表仅返回FPerson字段列,负载小
select FNumber as 编码 from T_Debt
select FNumber 编码 from T_Debt
&#8211;检索T_Debt表返回FNumber字段列并把FNumber列名显示为&#8217;编码&#8217;,AS语法可省略
select * from T_Debt where FNumber='002'
&#8211;根据条件检索T_Debt表仅返回FNumber字段等于&#8217;002&#8242;的数据
select * from T_Debt where FNumber='002' or FPerson='zerg'
&#8211;根据条件检索T_Debt表仅返回FNumber字段或者FPerson字段满足条件
数据汇总函数：
max()   计算字段最大值
min()    计算字段最小值
avg()   计算字段平均值
sum()   计算字段合计值
count()   统计数据条数
select max(FAmount) from T_Debt
&#8211;检索T_Debt表返回FAmount字段最大值,返回的数据列为虚拟列
select count(*) from T_Debt
select count(FAmount) from T_Debt
&#8211;如果FAmount字段所有数据总没有NULL空值，则上述2句语句效果相同，如果FAmount字段包含NULL空值，则count(*)结果大于count(FAmount)结果
select * from [...]]]></description>
		<wfw:commentRss>http://www.thtznet.com/124.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mssql学习笔记：集合概念</title>
		<link>http://www.thtznet.com/123.html</link>
		<comments>http://www.thtznet.com/123.html#comments</comments>
		<pubDate>Sun, 13 Jun 2010 04:31:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[金蝶技术]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.thtznet.com/?p=123</guid>
		<description><![CDATA[select fitemid from t_ICItem union select fitemid from ICInventory
&#8211;联合2张表去除重复记录
select fitemid from t_ICItem union all select fitemid from ICInventory
&#8211;联合2张表不去除重复记录
select fitemid from t_ICItem intersect select fitemid from ICInventory
&#8211;联合2张表仅显示重复记录
select fitemid from t_ICItem t1 where t1.fitemid not in (select fitemid from ICInventory)
&#8211;联合2张表仅显示不在ICInventory中的记录
]]></description>
		<wfw:commentRss>http://www.thtznet.com/123.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mssql学习笔记：创建表,插入数据,更新数据,删除表</title>
		<link>http://www.thtznet.com/120.html</link>
		<comments>http://www.thtznet.com/120.html#comments</comments>
		<pubDate>Wed, 09 Jun 2010 07:57:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[金蝶技术]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.thtznet.com/?p=120</guid>
		<description><![CDATA[create  table  T_Person (FName  varchar(20),FAge  int,FRemark  varchar(20),primary key (FName))
&#8211;创建T_Person表，FName为主键
create table T_Debt (FNumber varchar(20),FAmount numeric(10,2) not null,FPerson varchar(20),primary key (FNumber),foreign key (FPerson) references T_Person(FName))
&#8211;创建T_Debt表，FNumber为主键，FAmount字段非空控制，T_Person表FName字段与T_Debt表FNumber字段为外键关联
insert into T_Person(FName,FAge,fremark) values('kevin','25','jiangsu')
&#8211;向T-Person表插入一笔数据
insert into T_Debt(fnumber,famount,fperson) values('001','5000.00','kevin')
&#8211;向T_Debt表插入一笔数据，FPerson字段外键约束自T_Person表FName字段(即FPerson字段想插入的数据kevin必须预先存在于T_Person表FName字段中)
update T_Person set fage='24',FRemark='shanghai' where FName='zerg'
&#8211;更新T_Person表FAge、FRemark字段
delete from T_Debt where FNumber='001'
&#8211;删除T_Debt表中FNumber字段为001的数据
drop table T_Debt
drop talbe T_Person
&#8211;删除T_Debt、T_Person表
]]></description>
		<wfw:commentRss>http://www.thtznet.com/120.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装 SQL 2008 访问被拒绝</title>
		<link>http://www.thtznet.com/107.html</link>
		<comments>http://www.thtznet.com/107.html#comments</comments>
		<pubDate>Tue, 02 Mar 2010 13:51:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[网络相关]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL2008]]></category>

		<guid isPermaLink="false">http://www.thtznet.com/?p=107</guid>
		<description><![CDATA[今天在客户的一台服务器上升级SQL2K到2K8，竟然在安装的时候提示：&#8221;C:\Program Files\Microsoft SQL Server\100\License Terms\SQLServer2008_License_ENT_2052访问被拒绝。&#8221;怎么看都是一个无关紧要的文本文件，不可能是被程序占用而无法修改，明显是权限问题，果然进入给目录加了个Everyone权限就可以正常通过了。真是纳闷好好的安装自动生成的文件竟然在administrator下存在无权限读取，真是服了微软。
]]></description>
		<wfw:commentRss>http://www.thtznet.com/107.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>金蝶K/3发票已传递的反初始化应收应付解决方案</title>
		<link>http://www.thtznet.com/98.html</link>
		<comments>http://www.thtznet.com/98.html#comments</comments>
		<pubDate>Fri, 11 Dec 2009 03:06:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[金蝶技术]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[金蝶]]></category>

		<guid isPermaLink="false">http://www.thtznet.com/?p=98</guid>
		<description><![CDATA[对于已经启用应收应付模块后，供应链发票已经被传递到应收应付系统的反初始化需要删除所有的应收应付单据和必须反勾稽供应链发票。
对于反初始化应收应付模块，删除本身模块产生的单据完全合乎情理，但是需要涉及到供应链模块的发票需要全部反勾稽，在某些情况下客户不愿意这么做，而且没有批量反勾稽，工作量巨大，使用SQL后台修改可以很轻松的解决这个问题：
在查询分析器里运行下列语句：
delete t_rp_contact where frp=1 ;应付模块
delete t_rp_contact where frp=0 ;应收模块
以上语句会直接清空应收应付模块里的发票而不影响供应链模块内的发票。
]]></description>
		<wfw:commentRss>http://www.thtznet.com/98.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
