Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: hi all

Re: hi all

From: alek <alexandru.tica_at_gmail.com>
Date: Mon, 12 Nov 2007 09:35:37 -0000
Message-ID: <1194860137.815320.303790@d55g2000hsg.googlegroups.com>


On Nov 12, 10:35 am, mamta81 <roy.ma..._at_gmail.com> wrote:
> Hi , I have a file cfoil1.sql when i try to run tht in my sqldeveloper
> or toad i get the following error message
>
> declare
> CURSOR l1 is select bank_code,x,name,cat,idcode
> from salchq order by cat,bank_code,idcode;
> chq_no number(6):= 190423;
> bnk_code char(2);
> netsal number;
> bnkname varchar2 (120);
> cat char(1);
> idcode char(6);
> begin
> OPEN l1;
> LOOP
> FETCH l1 into bnk_code, netsal,bnkname,cat,idcode;
> EXIT when l1%notfound;
> chq_no := chq_no + 1;
> if bnk_code != 'AZ' then
> insert into C_FOIL (CHQ_NO,BNKCODE,BNKNAME,NETSAL,CAT,IDCODE)
> values (chq_no,bnk_code,bnkname,netsal,cat,idcode);
> commit;
> END IF;
> END LOOP;
> close l1;
> end;
> insert into sal_chq_printed select mon_start, chq_no, bnkcode,
> bnkname, netsal, idcode from c_foil, s_globals
>
> /
>
> Error report:
> ORA-06550: line 24, column 2:
> PLS-00103: Encountered the symbol "INSERT"
> 06550. 00000 - "line %s, column %s:\n%s"
> *Cause: Usually a PL/SQL compilation error.
> *Action:

Hi,

the INSERT statement from the end of your file is outside of the anonymous block which should be ended by a "/". Received on Mon Nov 12 2007 - 03:35:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US