摘要:
declare @temp varchar(50)DECLARE My_Cursor CURSOR --定义游标FOR (SELECT t.PACK_CODE FROM T_MDM_PRO_PRODUCT_STRUCT t group by t.PACK_CODE) --查出需要的集合放到游标中OP 阅读全文
摘要:
SELECT CASE WHEN GROUPING(F1) = 1 THEN '总计' WHEN GROUPING(F1) = 0 AND GROUPING(F2) = 1 THEN F1+'合计' WHEN GROUPING(F1) = 0 AND GROUPING(F2) = 0 AND GRO 阅读全文