Home » SQL & PL/SQL » SQL & PL/SQL » errors in a package (assistance reqired)
errors in a package [message #274951] Wed, 17 October 2007 21:35 Go to next message
appsoracleuser
Messages: 9
Registered: October 2007
Junior Member
i created a package in toad
this is my package

CREATE OR REPLACE PACKAGE test_pack is
cursor t1 is select test_oc,apdat_c,test_m_code,test_mgl,test_tcode,test_mgl1,credit_acct,dollar
from test_data;
END test_pack;

and my package body is
CREATE OR REPLACE PACKAGE BODY test_pack IS
v_test_oc test_data.test_oc%type;
v_apdat_c test_data.APDAT_C%type;
v_test_m_code test_data.TEST_M_CODE%type;
v_test_mgl test_data.test_mgl%type;
v_test_tcode test_data.TEST_TCODE%type;
v_test_mgl1 test_data.TEST_MGL1%type;
v_credit_acct test_data.CREDIT_ACCT%type;
v_dollar test_data.DOLLAR%type;
begin
open t1;
loop
fetch t1 into v_test_oc,v_apdat_c,v_test_m_code,v_test_mgl,v_test_tcode,v_test_mgl1,v_credit_acct,v_dollar;
exit when t1%notfound;
print('size of test_oc='||length(to_char(v_test_oc)));
end loop;
close t1;
END test_pack;
/
when i am trying to execute this package in sql editor of toad
i am getting the following errors

22:12:11 Error: ORA-06550: line 1, column 7:
PLS-00221: 'TEST_PACK' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

can any body help me.Assistance required
Re: errors in a package [message #274959 is a reply to message #274951] Wed, 17 October 2007 22:37 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>can any body help me.Assistance required
http://asktom.com.com has many fine coding examples.
or if you want to actually learn something new, try Reading The Fine Manual

http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm
Re: errors in a package [message #274991 is a reply to message #274951] Thu, 18 October 2007 01:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Regards
Michel
Re: errors in a package [message #275002 is a reply to message #274991] Thu, 18 October 2007 01:34 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Perhaps it's best you start with understanding what a package actually is. Here's a link. You don't execute packages, you execute packaged procedures/functions. Granted, a package can have startup code but that's a different story. I'd start with the link I provided.

MHE

PS: Michel's link is useful. I'd read it as well. Wink
Previous Topic: Change Datatype to CLOB
Next Topic: Materialized View
Goto Forum:
  


Current Time: Fri Dec 09 17:53:37 CST 2016

Total time taken to generate the page: 0.11003 seconds