会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
起航Fly
博客园
首页
新随笔
联系
管理
订阅
2014年8月28日
SQL Server将相同id的另一列的多行内容拼接成一行
摘要: 比如表中有两列数据 :id name1 a1 b1 c2 d2 e变成如下格式:id name1 a,b,c2 d,e数据:if object_id(#表)is not null drop table #表select did,name, from #表 order by diddrop table...
阅读全文
posted @ 2014-08-28 16:49 起航Fly
阅读(14740)
评论(1)
推荐(0)
编辑
2014年8月26日
通过case when自定义的段位进行统计排序
摘要: 通过case when 进行自定义排序select * from (select a.c#,cname,case when score>=85 then '100-85' when score=70 then '85-70' ...
阅读全文
posted @ 2014-08-26 10:31 起航Fly
阅读(463)
评论(0)
推荐(0)
编辑
2014年8月25日
同一主表,明细不同数据进行合并
摘要: 对明细中的同一主键ID相关数据进行合并1.主表的【项目】+明细表的【附加项目】2.明细表的金额数据源if object_id('tempdb..#主表') is not null drop table tempdb..#主表if object_id('tempdb..#细表') is not nul...
阅读全文
posted @ 2014-08-25 16:47 起航Fly
阅读(877)
评论(0)
推荐(0)
编辑
公告