20260513_dingban
This commit is contained in:
@@ -89,6 +89,117 @@ SET PACK_COD = if( PACK_COD REGEXP '^[0-9]',right(concat('000000000000',PACK_COD
|
||||
|
||||
-- COMMAND ----------
|
||||
|
||||
INSERT OVERWRITE TABLE dwd.DWD_gnd_ext_retail_tblmarket (
|
||||
market_no,
|
||||
market,
|
||||
bu,
|
||||
atc1_code,
|
||||
atc2_code,
|
||||
atc3_code,
|
||||
atc4_code,
|
||||
nfc1_code,
|
||||
nfc2_code,
|
||||
nfc3_code,
|
||||
pack_code,
|
||||
pack_desc,
|
||||
strength,
|
||||
product_code,
|
||||
product_desc,
|
||||
molecule_code,
|
||||
molecule_desc,
|
||||
not_in_flag,
|
||||
extend_market,
|
||||
extend_market_ratio,
|
||||
corporation_code,
|
||||
corporation_desc,
|
||||
manufacturer_code,
|
||||
manufacturer_desc
|
||||
)
|
||||
select distinct
|
||||
market_no,
|
||||
market,
|
||||
bu,
|
||||
atc1_code,
|
||||
atc2_code,
|
||||
atc3_code,
|
||||
atc4_code,
|
||||
nfc1_code,
|
||||
nfc2_code,
|
||||
nfc3_code,
|
||||
pack_code,
|
||||
pack_desc,
|
||||
strength,
|
||||
product_code,
|
||||
product_desc,
|
||||
molecule_code,
|
||||
molecule_desc,
|
||||
not_in_flag,
|
||||
extend_market,
|
||||
extend_market_ratio,
|
||||
corporation_code,
|
||||
corporation_desc,
|
||||
manufacturer_code,
|
||||
manufacturer_desc
|
||||
from
|
||||
dwd.dwd_gnd_retail_tblmarket_bymonth;
|
||||
|
||||
|
||||
INSERT OVERWRITE TABLE DWD.dwd_gnd_dtp_tblmarket (
|
||||
market_no,
|
||||
market,
|
||||
bu,
|
||||
atc1_code,
|
||||
atc2_code,
|
||||
atc3_code,
|
||||
atc4_code,
|
||||
nfc1_code,
|
||||
nfc2_code,
|
||||
nfc3_code,
|
||||
pack_code,
|
||||
pack_desc,
|
||||
strength,
|
||||
product_code,
|
||||
product_desc,
|
||||
molecule_code,
|
||||
molecule_desc,
|
||||
not_in_flag,
|
||||
extend_market,
|
||||
extend_market_ratio,
|
||||
corporation_code,
|
||||
corporation_desc,
|
||||
manufacturer_code,
|
||||
manufacturer_desc
|
||||
)
|
||||
select distinct
|
||||
market_no,
|
||||
market,
|
||||
bu,
|
||||
atc1_code,
|
||||
atc2_code,
|
||||
atc3_code,
|
||||
atc4_code,
|
||||
nfc1_code,
|
||||
nfc2_code,
|
||||
nfc3_code,
|
||||
pack_code,
|
||||
pack_desc,
|
||||
strength,
|
||||
product_code,
|
||||
product_desc,
|
||||
molecule_code,
|
||||
molecule_desc,
|
||||
not_in_flag,
|
||||
extend_market,
|
||||
extend_market_ratio,
|
||||
corporation_code,
|
||||
corporation_desc,
|
||||
manufacturer_code,
|
||||
manufacturer_desc
|
||||
from
|
||||
dwd.dwd_gnd_dtp_tblmarket_bymonth;
|
||||
|
||||
-- COMMAND ----------
|
||||
|
||||
update DWD.dwd_gnd_tblmarket_bymonth
|
||||
set starttime = '200001'
|
||||
where starttime is null or starttime='' or starttime='All';
|
||||
|
||||
Reference in New Issue
Block a user