Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 19th, 2005, 04:20 AM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to madhav007
Default PL/SQL Procedure

i have created a procedure named sch_proc but when i try to execute the query i get an error saying:

ORA-06550: line 2, column 8:
PLS-00302: component 'SCH_PROC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

the code is:

CREATE OR REPLACE PROCEDURE Sch_Proc(b IN NUMBER)
AS
duedate SCH.due_date%TYPE;
counts NUMBER(7);
infos VARCHAR2(100);
CURSOR sch_cur IS SELECT COUNT(t1.due_date) Scheduled_Events,t1.due_date, t2.case_id || ' ' ||t2.client_name || ' ' || t2.T AS info
FROM SCH t1, SCH t2 WHERE t1.due_date = t2.due_date
GROUP BY t1.due_date,t2.client_name,t2.t,t2.case_id;
BEGIN
IF b= 1 THEN
OPEN sch_cur;
LOOP
FETCH sch_cur INTO counts,duedate,infos;
IF duedate = duedate AND counts = 1 OR counts - 2 = 1 OR counts - 1 = 1 THEN
INSERT INTO TEMP(due_date,scheduled_events,slot1) VALUES(duedate,counts,infos);
ELSIF duedate = duedate AND counts = 2 OR counts - 1 = 2 THEN
UPDATE TEMP SET slot2 = infos WHERE due_date = duedate;
ELSIF duedate = duedate AND counts = 3 THEN
UPDATE TEMP SET slot3 = infos WHERE due_date = duedate;
END IF;
END LOOP;
CLOSE sch_cur;
END IF;
COMMIT;
END Sch_Proc;

please help me regarding this.

Thanks in Advance
Madhavan G V

  #2 (permalink)  
Old May 29th, 2005, 01:22 AM
Registered User
 
Join Date: May 2005
Location: Moscow, , Russia.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The user under which you have created this procedure
and the user under which you are trying to execute it
are distinct, i believe. In that case you must give rights
on execution of proc to another user.

Andrew

Quote:
quote:Originally posted by madhav007
 i have created a procedure named sch_proc but when i try to execute the query i get an error saying:

ORA-06550: line 2, column 8:
PLS-00302: component 'SCH_PROC' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
return a table/rowset with pl/sql procedure acoles Oracle 4 February 14th, 2008 01:54 AM
PL/SQL Somesh ASP.NET 1.0 and 1.1 Basics 7 December 15th, 2006 05:49 PM
PL/SQL i need help loveboy23 Oracle 3 January 6th, 2005 01:14 AM
PL/SQL help carly_1 Oracle 1 October 19th, 2003 08:14 PM
PL/SQL help Blue Oracle 0 August 12th, 2003 02:54 PM



All times are GMT -4. The time now is 08:18 PM.


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