Home » Other » Client Tools » Re: ora-06550 in Toad
Re: ora-06550 in Toad [message #35984] Sun, 28 October 2001 20:37
shweta
Messages: 8
Registered: May 2001
Junior Member
1 declare
2 cursor cur1 is select sum(dr_amt) dramt,
3 sum(cr_amt) cramt,vchr_no,to_char(vchr_date,'MM') month from
4 voucher_main group by vchr_no,to_char(vchr_date,'MM');
5 cursor cur2 is select vchr_no,month from voucher_dtl where vchr_no = c1.vchr_no an
6 vardramt number;
7 varcramt number;
8 c1 cur1%rowtype;
9 c2 cur2%rowtype;
10 begin
11 open cur1;
12 open cur2;
13 loop
14 fetch cur1 into c1;
15 fetch cur2 into c2;
16 exit when cur1%notfound;
17 exit when cur2%notfound;
18 if c2%found then
19 vardramt := (select opbal from voucher_dtl where vchr_no = c2.vchr_no);
20 varcramt := (select cropbal from voucher_dtl where vchr_no = c2.vchr_no into) ;
21 update voucher_dtl set
22 clbal = vardramt+c1.dramt,crclbal = varcramt+c1.cramt;
23 else
24 insert into voucher_dtl(vchr_no,month,opbal,cropbal)
25 values(c1.vchr_no,c1.month,c1.dramt,c1.cramt);
26 end loop;
27 close cur1;
28* end;
SQL> /
vardramt := (select opbal from voucher_dtl where vchr_no = c2.vchr_no);
*
ERROR at line 19:
ORA-06550: line 19, column 14:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
ORA-06550: line 20, column 1:
PLS-00103: Encountered the symbol "VARCRAMT"

plzz tell me why am i getting these erroros??

----------------------------------------------------------------------
Previous Topic: Delphi Oracle
Next Topic: Re: SQL *Plus Worksheet does **NOTHING** (NT, 8.1.6)
Goto Forum:
  


Current Time: Fri Apr 19 11:48:33 CDT 2024