Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 8th, 2006, 05:07 PM
Registered User
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create and executing an oracle stored procedure

Hi All,
I am new to Oracle. I am facing problem in executing the procedure. My requirement is to create a procedure which passes one input parameter and gets the stats data for that input value and should return an array or ADO.
Can somebody help me pls...

CREATE OR REPLACE procedure DB_Popup1 ( c_Val IN Schema1.Table1_stat_data.id%TYPE, cur_val OUT Schema1.Table1_stat_data.number%TYPE)is


select distinct count(*) into cur_val from Schema1.Table1_stat_data
where TO_CHAR(Table1_stat_data.datetime,'dd-mon-yyyy') = TO_CHAR(SYSDATE -2,'dd-mon-yyyy')
AND id_cre = '1609' group by id having count(*) < 244;


Thanks in advance,


Old January 10th, 2006, 05:10 AM
Authorized User
Join Date: Sep 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to prabodh_mishra

Try using ref cursors..
Define a package with procedure and ref. cursor declaration.
Write the procedure in the package body.
It's the most convenient way to return a multidimensional
array like data...

PROCEDURE <proc name>
( var1 IN NUMBER,
   CUR_1 IN OUT refCur_1
    OPEN refCur_1 FOR
    <SELECT statement>

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle Stored Procedure life.gurpreet C# 2005 0 March 13th, 2007 04:54 AM
Executing an UPDATE Stored Procedure ashg657 Access VBA 1 June 9th, 2006 06:29 AM
Executing a stored procedure from ASP tlbacon527 Classic ASP Databases 2 January 23rd, 2004 03:50 PM
Executing a Stored Procedure using ASP. treadmill Classic ASP Databases 3 July 24th, 2003 04:21 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.