Hi,
Just faced a problem on my update query, as it takes hours to execute. Anyone can help me to "improve" the attached stmt below ?
Update CUST_CONT C set (C.cust_addr_type_code, C.cust_fax_no, C.cust_email_txt, C.cust_person_txt, C.cust_phone_no, C.cust_mobile_phone_no, C.cust_pager_no, C.cust_contrmk_txt, C.cust_defmail_f)
= (Select DISTINCT T.GEN_ADDR_TYPE_CODE, T.ACA_FAX_NO, T.ACA_EMAIL_TXT, T.ACA_PERSON_TXT, T.ACA_PHONE_NO,
T.ACA_MOBILE_PHONE_NO, T.ACA_PAGER_NO, T.ACA_CONTRMK_TXT, 'Y'
From temp_ut_ac_conv T Where T.ipt_gen_insttu_code = 'XXX' and T.cust_no = C.cust_no)
Where C.gen_insttu_code = 'XXX'
and exists (Select * From temp_ut_ac_conv T
Where T.ipt_gen_insttu_code = 'XXX' and T.cust_no = C.cust_no);
P/S: The data in the table exceed 100,000 records.
Thanks....
kclow
Just faced a problem on my update query, as it takes hours to execute. Anyone can help me to "improve" the attached stmt below ?
Update CUST_CONT C set (C.cust_addr_type_code, C.cust_fax_no, C.cust_email_txt, C.cust_person_txt, C.cust_phone_no, C.cust_mobile_phone_no, C.cust_pager_no, C.cust_contrmk_txt, C.cust_defmail_f)
= (Select DISTINCT T.GEN_ADDR_TYPE_CODE, T.ACA_FAX_NO, T.ACA_EMAIL_TXT, T.ACA_PERSON_TXT, T.ACA_PHONE_NO,
T.ACA_MOBILE_PHONE_NO, T.ACA_PAGER_NO, T.ACA_CONTRMK_TXT, 'Y'
From temp_ut_ac_conv T Where T.ipt_gen_insttu_code = 'XXX' and T.cust_no = C.cust_no)
Where C.gen_insttu_code = 'XXX'
and exists (Select * From temp_ut_ac_conv T
Where T.ipt_gen_insttu_code = 'XXX' and T.cust_no = C.cust_no);
P/S: The data in the table exceed 100,000 records.
Thanks....
kclow