Using Exceute immediate to update Dynamic data -- Error invalid SQL statement
Database oracle9.2.0.7
I am trying to create a SP to Execute Update statements dynamically.I am doing the following things.
1)create a curor with the statement
CURSOR index1 index1IS
SELECT '''Update MUREXODS.RT_INDEX U SET (U.M_FIXING, U.M_INS_DATE) IN (SELECT B.M_FIXING,B.M_INS_DATE from ' || trim(M_FIXING_TABLE) || ' B INNER JOIN ' || trim(M_TABLE_NAME)|| ' H ON H.M_KEYID = B.M_KEYID WHERE trim(H.M_KEY0) = trim(U.M_CURRENCY) AND trim(H.M_KEY1) = trim(U.M_RAT_FREQ) and B.M_DATE = U.M_DATE AND U.M_HISFILE = '''''0