Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to declare table in sql*plus 2

Status
Not open for further replies.

Ravala

Programmer
Jan 28, 2004
88
US
I have package:
CREATE OR REPLACE PACKAGE UPD_FUNCTION_STATUS AS
TYPE tJacketID is TABLE of NUMBER(10) INDEX BY BINARY_INTEGER;
PROCEDURE UPD_OPEN_WAIT (JacketID IN tJacketID );
END;
How can I execute this package from sql*plus?
I tryed to set:
var JacketID TABLE of NUMBER(10) INDEX BY BINARY_INTEGER;
and var JacketID tJacketID;
it doesn't work this way.

Thanks.
 
Try

Code:
DECLARE
  JacketID upd_function_status.tJacketID;
BEGIN
  upd_function_status.upd_open_wait(JacketID);
END;

Of course, you will have to process the data in the table within the anonymous precedure block as the table will not be visible outside the block.
 
Ravala,

SQL*Plus does not support tables declarations. PL/SQL is the venue for in-memory table declarations:
Code:
declare
    type x is table of number(10) index by binary_integer;
    jacket_id x;
begin
...

Let us know if you have additional questions.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 16:48 (29Oct04) UTC (aka "GMT" and "Zulu"),
@ 09:48 (29Oct04) Mountain Time


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top