替换 dm_tf_external_sales -> DM_TF_EXT_UNIONALL_SALES(排除 z 01*)

This commit is contained in:
2026-04-27 16:59:17 +08:00
parent 832c7bcd69
commit 9c98a4b8d9
12 changed files with 43 additions and 43 deletions

View File

@@ -22,7 +22,7 @@ dept_name,
new_code,
area,
YYYYMM
from dm.dm_tf_external_sales
from dm.DM_TF_EXT_UNIONALL_SALES
union all
select distinct
PACK_COD,
@@ -194,7 +194,7 @@ insert overwrite dm.dm_td_external_packinfo_temp (
SELECT DISTINCT
PACK_COD
FROM
external_sales_union-- WHERE YYYYMM >= (SELECT CAST((LEFT(MAX(YYYYMM),4)-3)*100+1 AS INT) FROM DM.DM_TF_EXTERNAL_SALES)) A
external_sales_union-- WHERE YYYYMM >= (SELECT CAST((LEFT(MAX(YYYYMM),4)-3)*100+1 AS INT) FROM DM.DM_TF_EXT_UNIONALL_SALES)) A
) A
LEFT JOIN DM.DM_IMS_TD_PACK_PROPERTY B