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 -> Re: Abandoning good programming practice?

Re: Abandoning good programming practice?

From: Kurt Laugesen <kula_at_int.tele.dk>
Date: 25 Apr 2002 06:34:30 -0700
Message-ID: <7c804feb.0204250534.544b0f18@posting.google.com>


Yes - but it won't work

"Vladimir M. Zakharychev" <bob_at_dpsp-yes.com> wrote in message news:<aa5pvl$jqq$1_at_babylon.agtel.net>...
> Just a guess:
>
> did you try ADDRESS_GENERAL_T.FIRSTNAME%TYPE ?
>
> --
> Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com
> Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
> All opinions are mine and do not necessarily go in line with those of my employer.
>
>
> "Kurt Laugesen" <kula_at_int.tele.dk> wrote in message
> news:7c804feb.0204231251.1521c267_at_posting.google.com...
> > Suppose I have the following (a VERY shortened version):
> > CREATE OR REPLACE TYPE ADDRESS_GENERAL_T AS OBJECT (
> > FIRSTNAME VARCHAR2(40)
> > ,ADDRESS_TYPE VARCHAR2(20),
> >
> > MEMBER PROCEDURE updateaddress
> > (pFirstname VARCHAR2
> > ,paddress_type VARCHAR2 default 'STANDARD') ,
> >
> > STATIC FUNCTION MAKE RETURN ADDRESS_GENERAL_T
> > ) not final
> > /
> > CREATE OR REPLACE TYPE ADDRESS_TABLE_T AS TABLE OF ADDRESS_GENERAL_T
> > /
> >
> > ALTER TABLE LEGAL_PERSON ADD
> > (ID NUMBER(9)
> > ,ADDRESS ADDRESS_TABLE_T
> > ) NESTED TABLE ADDRESS STORE AS ADDRESS_TAB
> > /
> >
> > Suppose I want to expose to the outside world a procedure (in a
> > package - goes without saying) that could manipulate firstname in
> > legal_person I would normally do something like this:
> > PROCEDURE manipulate (
> > pId IN LEGAL_PERSON.ID%TYPE
> > ,pFirstname IN LEGAL_PERSON.FIRSTNAME%TYPE)
> >
> > but that of course will not do in this case.
> > I tried ADDRESS_TABLE_T.FIRSTNAME%TYPE but this gives an error that
> > %TYPE has to be applied to an actual object, so I tried something like
> > LEGAL_PERSON.ADDRESS(1).FIRSTNAME%TYPE but no go.
> > I could (in a package) declare a (dummy) variable of type
> > ADDRESS_GENERAL_T and then write dummy.firstname%type, but that does
> > not seem like a good idea.
> >
> > Do I really have to revert to write like this?:
> > PROCEDURE manipulate (
> > pId IN LEGAL_PERSON.ID%TYPE
> > ,pFirstname IN VARCHAR2)
> >
> > Regards
> > Kurt Laugesen
Received on Thu Apr 25 2002 - 08:34:30 CDT

Original text of this message

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