博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年2月29日

摘要: 1.记录分组叠加select c_GId,c_Id from t_Cargo where c_GId in ('MH-C2970','MX-B0794')查询结果:select b.c_GId,LEFT(b.CargoList,len(b.CargoList)-1) from ( select a.c_GId, ( select c_Id + ';' from t_Cargo where c_GId=a.c_GId for xml path('') ) as CargoList from t_Cargo a where a.c_. 阅读全文

posted @ 2012-02-29 13:54 小皓园 阅读(184) 评论(0) 推荐(0) 编辑