Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> oracle 9: collections syntax in proc?

oracle 9: collections syntax in proc?

From: <matt_at_mailinator.com>
Date: 26 Jun 2006 08:37:18 -0700
Message-ID: <1151336238.349222.215070@r2g2000cwb.googlegroups.com>


hello,

i am new to the oracle world, and am working on a project assigned to me.

i have a proc that takes in a bunch of normal strings & numbers parameters. now, it is supposed to take in a collection representing a list of IDs. if this were a CSV list, it would look like: "34,56,102", etc -- a variable-length list of IDs.

ive found these two articles on using collections:

http://www.williamrobertson.net/documents/comma_separated.html http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10799/adobjcol.htm

...which sound cool. but as a newbie, i just dont see enough examples
of how (exactly) to do this.

sounds like a varray is out, because my list length is variable & unknown. that leaves a nested table. to that end william robertson says: "The simplest solution is to change your procedure's parameter list so that it is by definition passed one." ok... how do i do this?

ive tried things like:

    PROCEDURE UpdateFurinishedEquipmentTag (

        p_comments IN VARCHAR2, --typical param
        p_IDCollection IN TABLE OF INTEGER

        ...

    )

....but my compiler (toad) didnt like that:

    PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:

   out <an identifier> <a double-quoted delimited-identifier>    LONG_ double ref char time timestamp interval date bina

can anyone help a n00b out?

thanks,
matt Received on Mon Jun 26 2006 - 10:37:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US