摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->--递归删除父节点及所有子节点 create table tb(Id int, ParentId int, Name varchar(5)) insert into tb select... 阅读全文
posted @ 2008-10-02 21:11 hyqwan 阅读(148) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->数据 Id Amt 0001 22 0001 33 0001 12.2 0002 55 0002 66 0002 10 0003 3 0003 80 需要结果 Id Amt Su... 阅读全文
posted @ 2008-10-01 21:31 hyqwan 阅读(192) 评论(0) 推荐(0)
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/* XM KeCheng FenShu -------- -------------------- ----------- 張三 語文... 阅读全文
posted @ 2008-09-29 19:04 hyqwan 阅读(310) 评论(2) 推荐(0)
摘要: declare @s varchar(1000) set @s='a,b,c,d,e,f,g,asdf,erqer,dfasd,vvvv,eeee,LLL' --找出4,5个之间,其实也就是第5个。替换为 nnn DECLARE @p INT,@v VARCHAR(10) SET @p=5 SET @v='nnn' DECLARE @x XML SET @x = CAST('' + REPLACE... 阅读全文
posted @ 2008-09-29 09:51 hyqwan 阅读(134) 评论(1) 推荐(0)
摘要: 主要是记录些平时看到的,自己想到的比较好的sql 1.求每行最大值 create table T(A decimal(10,1), B decimal(10,1), C decimal(10,1), D decimal(10,1), E decimal(10,1)) insert T select -21.5, -15.0, -5.0,... 阅读全文
posted @ 2008-09-26 12:39 hyqwan 阅读(360) 评论(7) 推荐(0)