DECLARE
  TYPE table_type_1 IS TABLE OF NUMBER(10);
  TYPE table_type_2 IS TABLE OF NUMBER(10);
  v_tab_1  table_type_1;
  v_tab_2  table_type_2;
BEGIN
  -- Initialise the collection with two values.
  v_tab_1 := table_type_1(1, 2);
  -- Assignment causes compilation error.
  v_tab_2 := v_tab_1;
END;
/
  v_tab_2 := v_tab_1;
             *
ERROR at line 11:
ORA-06550: line 11, column 14:
PLS-00382: expression is of wrong type
ORA-06550: line 11, column 3:
PL/SQL: Statement ignored
SQL>
Pages
- Home
 - SQL Fundamentals
 - SQL Fundamentals II
 - SQL PLUS
 - PL/SQL
 - Forms and Reports
 - HTML5
 - JavaScript
 - PHP
 - jQuery
 - Java
 - NLS_LANG
 - SQL SERVER
 - PL/SQL Collections and Records
 - DBMS_OUTPUT built-in package
 - Date and Time
 - PL/SQL Transactions
 - Ref Cursors
 - Bulk Binds
 - PL/SQL Analytic Functions
 - Problems and solves
 - Oracle Indexes
 - Oracle Courses
 - PHP
 - Work Samples
 - Record & Collection
 - LOOP
 - Conditional statements
 - Triggers
 - Object Oriented
 - Contact Me
 
Tuesday, October 20, 2015
Oracle collection error for assign variable of table to another
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment