dbTalk Databases Forums  

data to procedure? packed data?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss data to procedure? packed data? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jodleren
 
Posts: n/a

Default data to procedure? packed data? - 11-11-2010 , 03:35 AM






Hi all

I need to send data to this thing - and I guess that the
"selite" (explanation) is an array or something.
Just how do I do that?

I understand all the parameters, except the first one - and "comment"
is possible, but the product ID / name an option, as the procedure
should need to know what to work with.

Any ideas?

Sonnich

procedure VarastopaikkaSiirrot(ppSelite Vararasto_pack.vctable,
Function VarastoPaikkaSiirrot2(ppJuoksu in pls_integer,
ppPaikat in Vararasto_pack.intTable,
ppPaikka in pls_integer,
ppMuutos Vararasto_pack.floatTable,
ppMuutos in number,
ppTyyppi in char default 'S'
ppTyyppi in char,
) is
ppSelite in varchar2) return pls_integer is

Reply With Quote
  #2  
Old   
Mark D Powell
 
Posts: n/a

Default Re: data to procedure? packed data? - 11-11-2010 , 07:42 AM






On Nov 11, 4:35*am, jodleren <sonn... (AT) hot (DOT) ee> wrote:
Quote:
Hi all

I need to send data to this thing - and I guess that the
"selite" (explanation) is an array or something.
Just how do I do that?

I understand all the parameters, except the first one - and "comment"
is possible, but the product ID / name an option, as the procedure
should need to know what to work with.

Any ideas?

Sonnich

procedure VarastopaikkaSiirrot(ppSelite Vararasto_pack.vctable,
Function VarastoPaikkaSiirrot2(ppJuoksu in pls_integer,
ppPaikat in Vararasto_pack.intTable,
ppPaikka in pls_integer,
ppMuutos Vararasto_pack.floatTable,
ppMuutos in number,
ppTyyppi in char default 'S'
ppTyyppi in char,
) is
ppSelite in varchar2) return pls_integer is
In order to pass a pl/sql table (array) to a stored procedure you
first need to declare the collection in the caller. If Vararasto_pack
is a package specification then the definition can be found there.
Depending on what procedure VarastopaikkaSirrot does you may need to
populate the collection before making the call.

Here is an example that declares the pl/sql table of a record type
defined previously followed by a procedure definition that uses the
array:

-- record layout for plsql tbl to hold new tblspc
names
type r_ats is record (
tablespace_name varchar2(15)
,extent_sz number
,extents_avail number
,extents_used number
,is_tbl v_is_tbl%type
,is_mme v_is_mme%type
,is_lg v_is_lg%type
,is_spec v_is_spec%type
) ;
--
type t_atsr is table of r_ats
index by binary_integer ;
t_ats t_atsr ; -- alloc plsql tbl 4 new tblspc data
t_empty t_atsr ; -- empty tbl 2 allow freeing mem during
testing
--
-- procedure to load ats
--
procedure ats_ld(
p_ats in out t_ats%type
) is
--
I binary_integer ;
<snip>

HTH -- Mark D Powell --

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.