Hi, I have the below proc sql query where c_accnt table has columns present in attached excel(under updt_col_nm variable).where there are 5columns for c_accnt table.and 1 column each for remaining table.i have to do the same process of updating table in a efficient way. Which should be a dynamic way to do it.can we do this in single query?I have 20 table and their corresponding columns. Pls note: "Updt_col_nm"(varaible name in attached excel) is derived from "thr_pt_acct_nr_col_nm". I have used below query to update single table- Proc sql, Connect to teradata as tera(server="&eiwdb" authdomain="&segkc" mode=teradata); Execute( Update hst From libname.c_accnt hst, Libname.tb_rflkup lkp Set C_account_no=substr(lkp.new_thr_pt_acct_nr,7,23), C_account_no_cl=substr(lkp.new_thr_pt_acct_nr,7,23), C_company_id=substr(lkp.new_thr_pt_acct_nr,1,3), C_prd_cd=substr(lkp.new_thr_pt_acct_nr,4,3), Account_number=lkp.new_thr_pt_acct_nr Where hst.account_number=lkp.old_thr_pt_acct_nr; )by tera; Disconnect from tera; Quit;
... View more