![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
All, Is it possible to use pl/sql tables (Associative Arrays) instead of a varray when using the MEMBER OF condition? Thanks |
#3
| |||
| |||
|
|
All, Is it possible to use pl/sql tables (Associative Arrays) instead of a varray when using the MEMBER OF condition? Thanks |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
What I want to be able to do is use a record created at run time rather than create something in the schema. It doesn't seem to big a thing to expect to be able to do but apparently it is not possible. Anyone know if there is a technical reason why opr if it was simply something that was overlooed whern the functionality was introduced? Anyone have a work around? |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
William, Running the code below will illustrates the issue I am trying to resolve which takes the form of a compile time error PLS-00330: Invalid use of type name or subtype name. I am presuming this is to do with my use of a pl/sql table instead of a nested table. In addition to a pl/sql table, I have also tried it with the collection declarations/types commented out in the code and got the same message Thanks for your interest. Kevin CREATE OR REPLACE PACKAGE BODY REPORT_PKG IS * PROCEDURE testmemberofprc( * * * * * * po_ref_cursor * * * * * *OUT RefCursor) * IS * * TYPE alc_tab IS TABLE OF VARCHAR2(4000) INDEX BY PLS_INTEGER; * * --TYPE alc_tab IS TABLE OF VARCHAR2(4000); * * --TYPE alc_tab IS TABLE OF VARCHAR2(4000) NOT NULL; * * --TYPE alc_tab IS VARRAY(10) OF VARCHAR2(4000) NOT NULL; * * t_alc alc_tab; * * v_index NUMBER:=0; * * v_sql VARCHAR2(2000); * * v_errcode VARCHAR2(2000); * BEGIN * * t_alc(v_index) := 'GOR01'; * * v_index := v_index +1; * * t_alc(v_index) := 'GOR02'; * * v_index := v_index +1; * * t_alc(v_index) := 'GOR03'; * * v_sql := 'SELECT * FROM IOW_FULL_VW WHERE aggregatelevelcode MEMBER OF :t_alc '; * * OPEN po_ref_Cursor FOR v_sql USING t_alc; * EXCEPTION * WHEN OTHERS * * * *THEN * * * *v_errcode := Sqlerrm; * * * *RAISE; * END testmemberofprc; END REPORT_PKG; |
![]() |
| Thread Tools | |
| Display Modes | |
| |