INSERT INTO sm3pm
SELECT 'MANILA',
group_nm,
upper(theater_desc),
null,
upper(movie_title),
nvl(gross_amt,0),
v_mladt,
sysdate
from mlasm_details@hs_sm3pm_xls
where group_nm is not null
and movie_title is not null
and group_nm <> 'MOVIE_TITLE';
COMMIT;
update sm3pm_gross x
set theater_cd = (select max(theater_cd)
from stg_bds_theater_mstr
where trim(upper(theater_name)) = trim(upper(x.theater)))
where area = 'MANILA'
and theater_cd is null;