Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Procedure - how get the output value in sql+
Hi:
You need to write another store proc to test p_newid. See the following.
CREATE OR REPLACE PROCEDURE RUNTEST
AS
NewId number;
begin
p_newid(1,NewId);
dbms_output.put_line('newid:'||NewId);
end runtest;
After compile the runtest in sqlplus
set serveroutput on;
runtest;
Good luck
In article <8di41c$v7i$1_at_nnrp1.deja.com>,
newdb_at_my-deja.com wrote:
> I am new to Oracle and its PL/SQL.
> How can I get the output value of a procedure in sqlplus?
> Example:
> create or replace procedure p_newid (oldid IN number, newid out
> number ) is
> wn number;
> begin
> select ..... into wn;
> newid := wn;
> end;
> /
>
> When executing in sql+
> exec p_newid(1); I get
>
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00306: wrong number or types of arguments in call to
> 'P_NEWID'
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
-- Zosen Wang (wangz_at_rocketmail.com) Sent via Deja.com http://www.deja.com/ Before you buy.Received on Tue Apr 18 2000 - 00:00:00 CDT
![]() |
![]() |