Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> procedure: update a nested table syntax
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 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
( 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;
. ) , @
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.
Received on Tue Jul 18 2000 - 00:00:00 CDT
![]() |
![]() |