08 2014 档案
摘要:比如表中有两列数据 :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...
阅读全文
摘要:通过case when 进行自定义排序select * from (select a.c#,cname,case when score>=85 then '100-85' when score=70 then '85-70' ...
阅读全文
摘要:对明细中的同一主键ID相关数据进行合并1.主表的【项目】+明细表的【附加项目】2.明细表的金额数据源if object_id('tempdb..#主表') is not null drop table tempdb..#主表if object_id('tempdb..#细表') is not nul...
阅读全文

浙公网安备 33010602011771号