Re: Help on Procedure Builder

From: wozi <wozi_at_dhc.net>
Date: Wed, 29 Dec 1999 21:06:52 -0800
Message-ID: <873A0C958CED89D4.67CD4BAD7D8E06DF.341904EBCFAE6047_at_lp.airnews.net>


[Quoted] Looks like your insert statement is inserting the values incorrectly. Change "INSERT INTO TOMTEMP VALUES (my_sal, my_empno, my_ename);" TO INSERT INTO TOMTEMP VALUES (my_ename, my_empno,my_sal);

hope that helps

Tom Deseamus wrote in message ...
>I am trying to execute in SQL + a procedure created in Procedure Builder.
I
>am not creating any procedures in SQL + just
>running them there as a test. I have installed Developer 2000 and
>created the procedure that follows in procedure builder. I am logged in as
>SCOTT TIGER and the procedure is stored in the SCOTT schema.
>
>PROCEDURE tomtest1 IS
>
> CURSOR c1 is
> SELECT ename, empno, sal FROM emp
> ORDER BY sal DESC; -- start with highest-paid employee
> my_ename CHAR(10);
> my_empno NUMBER(4);
> my_sal NUMBER(7,2);
>
>BEGIN
> OPEN c1;
> LOOP
> FETCH c1 INTO my_ename, my_empno, my_sal;
> EXIT WHEN (c1%ROWCOUNT > 5) OR (c1%NOTFOUND);
> INSERT INTO TOMTEMP VALUES (my_sal, my_empno, my_ename);
> COMMIT;
> END LOOP;
> CLOSE c1;
>END;
>
>The procedure compiles fine and for creating the procedure in Procedure
>Builder, I believe the syntax is correct. When I log into SQL + as SCOTT
>and run the procedure as follows:
>
>EXECUTE TOMTEST1;
>
>
>I get the following error message:
>
>begin TOMTEST1; end;
>
>*
>ERROR at line 1:
>ORA-01722: invalid number
>ORA-06512: at "SCOTT.TOMTEST1", line 15
>ORA-06512: at line 1
>
>I do not know what the error could be, but I want to create all my
>procedures in Procedure Builder. Any help would be appreciated.
>
>Thanks,
>Tom
>
>
>
>
Received on Thu Dec 30 1999 - 06:06:52 CET

Original text of this message