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: procedure: update a nested table syntax

Re: procedure: update a nested table syntax

From: <shbano_at_my-deja.com>
Date: 2000/07/19
Message-ID: <8l2t4q$ktf$1@nnrp1.deja.com>#1/1

I feel like an idiot. So, the answer is, my update syntax was wrong.

No parens needed after the set.

I made that problem way too complicated. So now it works.

In article <8l2n9q$gll$1_at_nnrp1.deja.com>,   daniel_urbano_at_hotmail.com wrote:
> Hello-
>
> Trying to use nested tables in Oracle 8.1.6 using SQL*PLUS, running on
> Mandrake Linux.
>
> I have no problem declaring the type, creating the table and
> referencing the new type in the table.
>
> My problem comes when creating a procedure to update the nested table.
> I'm new to Oracle, PL/SQL, SQL*PLUS so here's my code.
>
> I know I can use VARRAYs, and perhaps make this even easier on me by
> creating the other table myself and writing my own function, but this
> small demonstration could prove useful on a larger scale.
>
> --------------------
> CREATE TYPE PERSON_DATE_TYPE AS TABLE OF DATE;
> /
> ---------------
>
> CREATE TABLE PERSON
> (
> PERSON_ID NUMBER(15) PRIMARY KEY,
> FIRST_NAME VARCHAR(30),
> LAST_NAME VARCHAR(30),
> PERSON_DATE PERSON_DATE_TYPE
> )
> NESTED TABLE PERSON_DATE STORE AS PERSON_DATE_ARRAY;CREATE
>
> ---------------
> PROCEDURE INSERT_DATE
> (
> PERSON_ID_IN IN NUMBER,
> PERSON_DATE_ARRAY_IN IN PERSON_DATE_TYPE
> )
> IS
> BEGIN
> UPDATE PERSON_DATE
> SET
> (
> PERSON_DATE = PERSON_DATE_ARRAY_IN
> )
> WHERE
> PERSON_ID = PERSON_ID_IN;
> END;
> /
>
> -------------
> Everything compiles with the exception of the procedure. I get:
> PLS-00103: Encountered the symbol "=" when expecting one of the
> following:
> . ) , @
>
> I have another procedure which inserts the information in the first
> place.
>
> Thanks in advance.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jul 19 2000 - 00:00:00 CDT

Original text of this message

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