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: Simple Create Procedure Problem..

Re: Simple Create Procedure Problem..

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Wed, 1 Dec 2004 05:17:59 -0500
Message-ID: <MPKdnRd0qOL8BzDcRVn-vQ@comcast.com>

"Arijit Chatterjee" <arijitchatterjee123_at_yahoo.co.in> wrote in message news:ea01504d.0412010134.65ddfb35_at_posting.google.com...
| Respected Faculties,
| As per your instruction at last I have created the procedure.But I
| want to see the output in variable "Open_Bal".
|




| SQL> CREATE OR REPLACE PROCEDURE PROC(ACCNO number)
| 2 AS
| 3 Open_Bal number(10);
| 4 BEGIN
| 5 select OPENINGAMOUNT into Open_Bal from accountmaster where
| ACCOUNTCODE = accno;
| 6 DBMS_OUTPUT.PUT_LINE(Open_Bal);
| 7 END;
| 8 /
|
| Procedure created.
|
| SQL> execute proc(160000);
|
| PL/SQL procedure successfully completed.
|
|



| What command I need to write???I have already got the PL/SQL PDF book
| from tahiti.oracle.com.Thanks once again for your great supports.
| Regards
| Arijit Chatterjee

you need to enable DBMS_OUPUT in your calling program

in SQL*Plus, you do this with the command SET SERVEROUTPUT ON

get the SQL*Plus User's Guide and Reference (and the SQL Reference manual while you're at it) and check out other options to the SET SERVEROUPUT on command

also, begin to get familiar with the differences between SQL*Plus commands and SQL & PL/SQL statements (for example, SET SERVEROUTPUT ON and EXECUTE and a SQL*Plus command, it will not work in other environments like TOAD, C++, etc -- look up ANONYMOUS BLOCKS in the PL/SQL manual and CALL in the SQL manual for alternatives to EXECUTE that you can use in all environments.)

++ mcs Received on Wed Dec 01 2004 - 04:17:59 CST

Original text of this message

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