declare
rate integer;
cursor c_f is
select treccy,treamt from tredtl where treccy not in ('YEN','EUR');
begin
select fxrate into rate from fxrate where fxfrccy='EUR'
for b in c_f
loop
select fxrate into rate2 from fxrate where fxrate not in ('YEN,'EUR') and fxfrccy =b.treccy;
if b.treccy<>'YEN' and b.treccy<>'EUR' then
update tredtl
set eur_equivalent_ amount=b.treamt *rate2/rate...
User Profile
Collapse
-
[QUOTE=debasisda s]TRY THE FOLLOWING CODE
Code:declare rate integer; cursor c_f is select treccy,treamt from tredtl where treccy not in ('YEN','EUR'); begin select fxrate into rate from TABLE_NAME where fxfrccy='EUR' for b in c_f loop select fxrate into rate2 from TABLE_NAME where fxrate not in ('YEN,'EUR') and fxfrccy =b.treccy; if b.treccy<>'YEN' and b.treccy<>'EUR'
Leave a comment:
-
Cursor update
Hi All,
I need a urgent help on the pl/sql written below
declare
rate integer;
cursor c_f is
select treccy,treamt from tredtl where treccy not in ('YEN,'EUR');
begin
select fxrate into rate where fxfrccy='EUR'
for b in c_f
loop
select fxrate into rate2 where fxrate not in ('YEN,'EUR') and fxfrccy =b.treccy;
if b.treccy<>'YEN' and b.treccy<>'EUR' then...
No activity results to display
Show More
Leave a comment: