Hi Gentmen
Im trying to write a PL/SQL program but the program is not doing anything. Please look at my code and advise or modify
Declare
2 Cursor farm is
3 Select
4 min_in_2.msisdn,substr(min_in_2.datehour,1,8)
5 From min_in_2, farm_win
6 Where
7 min_in_2.msisdn=farm_win.msisdn and min_in_2.act_amt > '2.0'
8 and substr(min_in_2.datehour,1,8) between '20051001' and '20051031';
9 amsisdn varchar(13);
10 adate varchr(10);
11 amount varchar(5);
12 Begin
13 Open farm;
14 Loop
15 Fetch farm into amsisdn,adate;
16 Exit when farm%notfound;
17 End Loop;
18 Exception
19 when no_data_found then
20 insert into errors.farm_erorrs (code, message) values('12', 'not found');
21 Close farm;
22 End;
Im trying to write a PL/SQL program but the program is not doing anything. Please look at my code and advise or modify
Declare
2 Cursor farm is
3 Select
4 min_in_2.msisdn,substr(min_in_2.datehour,1,8)
5 From min_in_2, farm_win
6 Where
7 min_in_2.msisdn=farm_win.msisdn and min_in_2.act_amt > '2.0'
8 and substr(min_in_2.datehour,1,8) between '20051001' and '20051031';
9 amsisdn varchar(13);
10 adate varchr(10);
11 amount varchar(5);
12 Begin
13 Open farm;
14 Loop
15 Fetch farm into amsisdn,adate;
16 Exit when farm%notfound;
17 End Loop;
18 Exception
19 when no_data_found then
20 insert into errors.farm_erorrs (code, message) values('12', 'not found');
21 Close farm;
22 End;