Re: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Date: 13 May 2003 06:09:07 -0700
Message-ID: <7db8e886.0305130509.1dbc8e98_at_posting.google.com>
Thanks Robert, but I don't know how that will fix the problem.(I'm not
too much into developing.) My problem, seems to be with the following
statement :
>sys.dbms_sys_sql.parse_as_user(v_cur,'grant SELECT, INSERT, UPDATE,
> DELETE on '||own||
> '.'||nam|| ' to developer', dbms_sql.native,'SYSADM');
"Robert Dimitrovski" <robert.dimitrovski_at_ht.hr> wrote in message news:<1052808842.420242_at_tuxri2.tkcrij.ht.hr>...
> After cursor pkgs is
> > select ora_dict_obj_owner, ora_dict_obj_name from wadba.event_table;
> insert recpkgs pkgs%ROWTYPE;
>
> "Vaughan Mc Carthy" <vmccarthy_at_worldaccess.com> wrote in message
> news:7db8e886.0305120748.28c75b8a_at_posting.google.com...
> > Hi
> >
> > I have the following piece of code, which results in the following
> > error when trying to execute it:
> > ERROR at line 1:
> > ORA-06502: PL/SQL: numeric or value error: character to number
> > conversion error
> > ORA-06512: at "WADBA.GRANT_PROC", line 17
> > ORA-06512: at line 1
> >
> > Code:
> > create or replace PROCEDURE grant_proc AS
> > own VARCHAR2(30);
> > nam VARCHAR2(30);
> > v_cur INTEGER;
> > v_cur1 INTEGER;
> > cursor pkgs is
> > select ora_dict_obj_owner, ora_dict_obj_name from wadba.event_table;
> > BEGIN
> > open pkgs;
> > loop
> > fetch pkgs into own, nam;
> > exit when pkgs%notfound;
> > --v_cur := dbms_sql.open_cursor;
> > --dbms_sql.parse(v_cur,'grant SELECT, INSERT, UPDATE, DELETE on
> > '||own||
> > --'.'||nam|| ' to developer', dbms_sql.native);
> > v_cur := sys.dbms_sys_sql.open_cursor();
> > sys.dbms_sys_sql.parse_as_user(v_cur,'grant SELECT, INSERT, UPDATE,
> > DELETE on '||own||
> > '.'||nam|| ' to developer', dbms_sql.native,'SYSADM');
> > sys.dbms_sys_sql.close_cursor(v_cur);
> > v_cur1 := dbms_sql.open_cursor;
> > dbms_sql.parse(v_cur1,'create synonym developer.'||nam||' for '||own||
> > '.'||nam, dbms_sql.native);
> > dbms_sql.close_cursor(v_cur1);
> > commit;
> > delete from wadba.event_table;
> > commit;
> > end loop;
> > end;
> > /
> >
> > Thanks
> > Vaughan
Received on Tue May 13 2003 - 15:09:07 CEST