先把代码放这儿,有空再来更新。
1 SELECT 2 T .* 3 FROM 4 ( 5 SELECT 6 TUL_ID, 7 LNR, 8 POS, 9 PL, 10 NF_UA_I, 11 PART_NUMBER, 12 TUL_Z, 13 DESCRIPTION, 14 CALC_WHT_ENG, 15 DRWG_DAT, 16 SEE_DRAW, 17 B_REL, 18 P_REL, 19 KIZ, 20 DS, 21 FK, 22 TP, 23 KD, 24 TUL_G, 25 D_STA, 26 COST, 27 WW, 28 DMU, 29 MOKZ, 30 ME, 31 UMFANG_TACT, 32 PR_NUM, 33 wmsys.wm_concat (PRODUCT_CODE) AS PRODUCT_CODE, 34 wmsys.wm_concat (NUM) AS NUM 35 FROM 36 ( 37 SELECT 38 TUL.TUL_ID, 39 TUL.LNR, 40 TUL.POS, 41 TUL.PL, 42 TUL.NF_UA_I, 43 TUL.PART_NUMBER, 44 TUL.TUL_Z, 45 TUL.DESCRIPTION, 46 TUL.CALC_WHT_ENG, 47 TUL.DRWG_DAT, 48 TUL.SEE_DRAW, 49 TUL.B_REL, 50 TUL.P_REL, 51 TUL.KIZ, 52 TUL.DS, 53 TUL.FK, 54 TUL.TP, 55 TUL.KD, 56 TUL.TUL_G, 57 TUL.D_STA, 58 TUL."COST", 59 TUL.WW, 60 TUL.DMU, 61 TUL.MOKZ, 62 TUL.ME, 63 TUL.UMFANG_TACT, 64 TUL.PR_NUM, 65 MODEL .PRODUCT_CODE, 66 PRO.NUM, 67 MODEL .IS_SVW 68 FROM 69 TT_AEKO_TUL tul 70 INNER JOIN TT_AEKO_TUL_MAPPING map ON TUL.TUL_ID = MAP.TUL_ID 71 LEFT OUTER JOIN TT_AEKO_TUL_PRODUCT pro ON tul.TUL_ID = pro.TUL_ID 72 AND tul.LNR = pro.LNR 73 LEFT OUTER JOIN TM_AEKO_MODEL MODEL ON PRO.MODEL_ID = MODEL .MODEL_ID 74 WHERE 75 map.CHANGE_NO = ‘A13D107‘ 76 AND map. VERSION = TO_DATE ( 77 ‘2015-10-10 11:13:00‘, 78 ‘yyyy-mm-dd hh24:mi:ss‘ 79 ) 80 ) 81 GROUP BY 82 TUL_ID, 83 LNR, 84 POS, 85 PL, 86 NF_UA_I, 87 PART_NUMBER, 88 TUL_Z, 89 DESCRIPTION, 90 CALC_WHT_ENG, 91 DRWG_DAT, 92 SEE_DRAW, 93 B_REL, 94 P_REL, 95 KIZ, 96 DS, 97 FK, 98 TP, 99 KD, 100 TUL_G, 101 D_STA, 102 COST, 103 WW, 104 DMU, 105 MOKZ, 106 ME, 107 UMFANG_TACT, 108 PR_NUM 109 ) T 110 WHERE 111 1 = 1
时间: 2024-12-14 06:51:54