This content has been marked as final. Show 2 replies
Why are you using @getval?
USERID gguser@olprod, password ********
MAP SRC.ACCOUNT, TARGET TGT.ACCOUNT, &
SQLEXEC (SPNAME MAX_TRANS, &
PARAMS (v_accno = accno)), &
COLMAP (USEDEFAULTS, TOT_BAL = MAX_TRANS.v_max_crd);
replication is working fine but its adding all the column valuesAll of which columns? And this should have failed:
select sum(trn.bal + int.int_amt) INTO v_max_crd from balance bal, interest int where accno=v_accno;Because you probably meant bal.bal instead of trn.bal. You also have no join between the tables BALANCE and INTEREST. I therefore suspect this is a homework assignment and will stop short of providing the solution. You need to get that query working in sqlplus first. You can also use TRACE in the SQLEXEC to see (in the report file) the values of the parameters being passed.
It's perfectly fine to use @GETVAL but as of several versions ago it is no longer required but still supported for backwards compatibility.