<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Code,We play with each other..._分类_SQL Server</title><id>http://feed.cnblogs.com/blog/u/24059/category/150159/rss</id><updated>2012-06-02T12:24:49Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/huazai/category/150159.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/24059/category/150159/rss"/><entry><id>http://www.cnblogs.com/huazai/archive/2011/03/06/1971967.html</id><title type="text">Sql server2005中如何格式化时间日期</title><summary type="text">执行下面格式化时间和日期的T-SQL脚本,在数据库查询分析器中示范了SQL Server中的大多数可用的时间数据格式。首先我们开始转换sql的一些可用的时间格式。SELECT convert(varchar, getdate(), 100) -- mon dd yyyy hh:mmAM (or PM)-- Oct 2 2008 11:01AM SELECT convert(varchar, getdate(), 101) -- mm/dd/yyyy - 10/02/2008 SELECT convert(varchar, getdate(), 102) -- yyyy.mm.dd -- 200</summary><published>2011-03-05T16:27:00Z</published><updated>2011-03-05T16:27:00Z</updated><author><name>PoulXia</name><uri>http://www.cnblogs.com/huazai/</uri></author><link rel="alternate" href="http://www.cnblogs.com/huazai/archive/2011/03/06/1971967.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/huazai/archive/2011/03/06/1971967.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/huazai/archive/2010/01/31/1660422.html</id><title type="text">SQL Server中的行列倒置技巧</title><summary type="text">行列倒置在sql server中是一种很常见的技巧，在做应用系统的时候，经常需要做一些统计功能避免不了使用行列倒置这个技巧，我小小的做了一下总结：第一种：sql server 2000中使用case进行行列倒置create table RowCellConvertTest(grade varchar(50),sex varchar(50),studentCount int)goinsert int...</summary><published>2010-01-31T05:09:00Z</published><updated>2010-01-31T05:09:00Z</updated><author><name>PoulXia</name><uri>http://www.cnblogs.com/huazai/</uri></author><link rel="alternate" href="http://www.cnblogs.com/huazai/archive/2010/01/31/1660422.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/huazai/archive/2010/01/31/1660422.html"/><content type="text">行列倒置在sql server中是一种很常见的技巧，在做应用系统的时候，经常需要做一些统计功能避免不了使用行列倒置这个技巧，我小小的做了一下总结：第一种：sql server 2000中使用case进行行列倒置create table RowCellConvertTest(grade varchar(50),sex varchar(50),studentCount int)goinsert int...</content></entry><entry><id>http://www.cnblogs.com/huazai/archive/2009/08/07/1541453.html</id><title type="text">利用XML FOR PATH 合并分组信息</title><summary type="text">最近做统计功能的时候经常需要用到合并分组内容，如果只根据分组统计数值用聚合函数就可以了，如果处理分组后的字符串列呢，我们就必须要自己写函数处理了，比如有这样的数据信息：现在要对上面数据进行分组，获取统计结果：实现方式一： [代码]实现方式二：利用 T-SQL 技术生成 XML 的方法[代码]呵呵，这样就是不是简单多了，不用再写一个函数去处理这么麻烦了。扩展：For XML Path1.在该 XML...</summary><published>2009-08-07T11:42:00Z</published><updated>2009-08-07T11:42:00Z</updated><author><name>PoulXia</name><uri>http://www.cnblogs.com/huazai/</uri></author><link rel="alternate" href="http://www.cnblogs.com/huazai/archive/2009/08/07/1541453.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/huazai/archive/2009/08/07/1541453.html"/><content type="text">最近做统计功能的时候经常需要用到合并分组内容，如果只根据分组统计数值用聚合函数就可以了，如果处理分组后的字符串列呢，我们就必须要自己写函数处理了，比如有这样的数据信息：现在要对上面数据进行分组，获取统计结果：实现方式一： [代码]实现方式二：利用 T-SQL 技术生成 XML 的方法[代码]呵呵，这样就是不是简单多了，不用再写一个函数去处理这么麻烦了。扩展：For XML Path1.在该 XML...</content></entry><entry><id>http://www.cnblogs.com/huazai/archive/2008/08/13/1267040.html</id><title type="text">Get correlative types by type</title><summary type="text">set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgocreate PROCEDURE [dbo].[Oud_FindPlanSonTypesIDS] ( @TypeID uniqueidentifier ) AS BEGIN WITH SUB_TABLE ( FTypeID , FParentID , FName) AS ( SELECT FTypeI...</summary><published>2008-08-13T08:17:00Z</published><updated>2008-08-13T08:17:00Z</updated><author><name>PoulXia</name><uri>http://www.cnblogs.com/huazai/</uri></author><link rel="alternate" href="http://www.cnblogs.com/huazai/archive/2008/08/13/1267040.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/huazai/archive/2008/08/13/1267040.html"/><content type="text">set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgocreate PROCEDURE [dbo].[Oud_FindPlanSonTypesIDS] ( @TypeID uniqueidentifier ) AS BEGIN WITH SUB_TABLE ( FTypeID , FParentID , FName) AS ( SELECT FTypeI...</content></entry><entry><id>http://www.cnblogs.com/huazai/archive/2008/07/03/1234608.html</id><title type="text">Sql Character String split to table</title><summary type="text"/><published>2008-07-03T03:20:00Z</published><updated>2008-07-03T03:20:00Z</updated><author><name>PoulXia</name><uri>http://www.cnblogs.com/huazai/</uri></author><link rel="alternate" href="http://www.cnblogs.com/huazai/archive/2008/07/03/1234608.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/huazai/archive/2008/07/03/1234608.html"/><content type="text"/></entry></feed>
