Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL struck in the way need some help
icon8.gif  PL/SQL struck in the way need some help [message #218920] Mon, 12 February 2007 01:39 Go to next message
anits2006
Messages: 4
Registered: February 2007
Location: Hyderabad
Junior Member
Hi ALL,

This is the package i have created :
CREATE OR REPLACE PACKAGE dummy1 AS

SUBTYPE BillRefInfoRecType IS c_pvpgi_billrefinfo%ROWTYPE;
TYPE BillRefInfoTabType IS TABLE OF BillRefInfoRecType
INDEX BY BINARY_INTEGER;

procedure h2h_perform_query(var1 in varchar2,
obt out BillRefInfoTabType);
end;
/
CREATE OR REPLACE PACKAGE BODY dummy1 AS
procedure h2h_perform_query(var1 in varchar2,
obt out BillRefInfoTabType) in
begin
dbms_output.put_line('this is dummy');
end ;
end dummy1;
/
I am calling the h2h_perform_query:
declare
SUBTYPE BillRefInfoRecType IS c_pvpgi_billrefinfo%ROWTYPE;
TYPE BillRefInfoTabType IS TABLE OF BillRefInfoRecType
INDEX BY BINARY_INTEGER;
obt1 BillRefInfoRecType ;
begin
h2h_perform_query('this is ',obt1);
end;
The error is :
ORA-06550: line 9, column 1:
PLS-00201: identifier 'H2H_PERFORM_QUERY' must be declared
ORA-06550: line 9, column 1:
PL/SQL: Statement ignored

can some help me to know why i am getting this error.

Advance thanks for the Help!!

[Updated on: Mon, 12 February 2007 01:41]

Report message to a moderator

Re: PL/SQL struck in the way need some help [message #218921 is a reply to message #218920] Mon, 12 February 2007 01:42 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
use the package name as prefix.
Re: PL/SQL struck in the way need some help [message #218923 is a reply to message #218921] Mon, 12 February 2007 01:56 Go to previous messageGo to next message
anits2006
Messages: 4
Registered: February 2007
Location: Hyderabad
Junior Member
hi Frank,

i have tryed using package name also.
Again same error.

Re: PL/SQL struck in the way need some help [message #218937 is a reply to message #218923] Mon, 12 February 2007 03:08 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
show what you did (copy-paste from sqlplus).
Which users did you use?
Re: PL/SQL struck in the way need some help [message #218940 is a reply to message #218937] Mon, 12 February 2007 03:15 Go to previous messageGo to next message
anits2006
Messages: 4
Registered: February 2007
Location: Hyderabad
Junior Member
The Package is as :
CREATE OR REPLACE PACKAGE dummy1 AS

SUBTYPE BillRefInfoRecType IS c_pvpgi_billrefinfo%ROWTYPE;
TYPE BillRefInfoTabType IS TABLE OF BillRefInfoRecType
INDEX BY BINARY_INTEGER;

procedure h2h_perform_query(var1 in varchar2,obt out BillRefInfoTabType);
end;


CREATE OR REPLACE PACKAGE BODY dummy1 AS

procedure h2h_perform_query(var1 in varchar2,
obt out BillRefInfoTabType) is

begin

dbms_output.put_line('this is dummy');
end ;

end dummy1;


This how i called the procedure :

declare
SUBTYPE BillRefInfoRecType IS c_pvpgi_billrefinfo%ROWTYPE;
TYPE BillRefInfoTabType IS TABLE OF BillRefInfoRecType
INDEX BY BINARY_INTEGER;

obt1 BillRefInfoRecType ;
begin

dummy1.h2h_perform_query('this is ',obt1);
dbms_output.put_line('this is success');
end;

The error it is giving as :
ORA-06550: line 9, column 1:
PLS-00306: wrong number or types of arguments in call to 'H2H_PERFORM_QUERY'
ORA-06550: line 9, column 1:
PL/SQL: Statement ignored


I can able to call the Procedures using IN/OUT as normal data type.

I am getting this error when i am using variable as:
SUBTYPE BillRefInfoRecType IS c_pvpgi_billrefinfo%ROWTYPE;
TYPE BillRefInfoTabType IS TABLE OF BillRefInfoRecType
INDEX BY BINARY_INTEGER;



[Updated on: Mon, 12 February 2007 03:17]

Report message to a moderator

Re: PL/SQL struck in the way need some help [message #218950 is a reply to message #218940] Mon, 12 February 2007 03:41 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The two types are not the same. Although you defined them in the same way, Oracle does not recognise them as being the same type.
Define your type either as SQL type (not in a package or procedure), or in the package specification, and let both variables point to the same definition.
Re: PL/SQL struck in the way need some help [message #218955 is a reply to message #218950] Mon, 12 February 2007 04:01 Go to previous message
anits2006
Messages: 4
Registered: February 2007
Location: Hyderabad
Junior Member
How do i have to do it .

How do i make the same definition to use by different variables.
Previous Topic: sql help
Next Topic: Getting error when executing dbms_job.run
Goto Forum:
  


Current Time: Sun Dec 11 00:14:44 CST 2016

Total time taken to generate the page: 0.30242 seconds