How to see the output of the varray

Hello
How can I see the output of the varray type;
declare
TYPE test_cas_ary IS VARRAY(2000) OF dept.deptno%TYPE;
v_cas_ary test_cas_ary;
begin
 dbms_output.put_line('dept_no(1) is '||v_cas_ary(1));
end;
The code above throws me error
Reference to uninitialized collection
Thank you
SQL> set serveroutput on
SQL> declare
TYPE test_cas_ary IS VARRAY(2000) OF dept.deptno%TYPE;
v_cas_ary test_cas_ary:=test_cas_ary(1,2);
begin
 dbms_output.put_line('dept_no(1) is '||v_cas_ary(1));
end;
 /
dept_no(1) is 1

PL/SQL procedure successfully completed.

Tags: Database

Similar Questions

  • How to see the signature of a function/procedure stored?

    Someone changed the signature of a function I am trying to run. It worked before, but now one of the parameters has changed to a new type. How to see the contents of it? It is the output in Oracle sqlplus.

    SQL > exec: rc: = newcaselistforvalidation (to_date ('2010-01-01 ',' yyyy-mm-dd hh), to_date ('2011-01-01 ',' yyyy-mm-dd hh), 100);
    START: rc: = newcaselistforvalidation (to_date ('2010-01-01 ',' yyyy-mm-dd hh), to_date ('2011-01-0))

    ***
    ERROR on line 1:
    ORA-01843: not one month valid
    ORA-06512: in "AST. NEWCASELISTFORVALIDATION', line 21
    ORA-06512: at line 1

    I suspect that this is the date which has been formatted into something new.
    SQL> desc newcaselistforvalidation
    
  • How to see the fn:trace() results in the newspaper and/or console workshop?

    Hello, all.
    So, I'm a new in ODSI, in advance, my excuse to basic questions.

    I would use the fn:trace () function. However, the following code does not send information either on AdminServer.log or Wokshop console. What is the reason?

    declare the procedure tns:test() {}
    declare $timeBefore as XS: date: = fn:current-date();
    FN: trace($timeBefore, "My First test"); -> How to see the trace output?
    Returns the value $timeBefore.
    };

    Here's what I have in the console AdminServer.log and workshop:

    common/application {}
    user: weblogic
    name: testCase2
    EventKind: update
    Server: AdminServer
    }

    performance of the query / {}
    compiletime: 93
    }

    common, session, request, invocation {}
    time: Tue may 25 15:41:12 IDT 2010
    Duration: 0
    }

    Update/service {}
    procedure: test
    arity: 0
    DataService: ld:Logical/over_files/testCase_OverFiles.ds
    script: declare ns0 namespace = "" ld: logic/over_files/testCase_OverFiles ";"
    {return value ns0:test() ;}
    }

    {/ common time signature}
    timestamp: Tue may 25 15:41:12 IDT 2010
    Duration: 93
    }

    Best regards
    Yuri.

    Edited by: ygauchma may 25, 2010 05:59

    Because I'm not over your shoulder, it must be very clear on what you tried.

    Your first post show you a procedure using the trace. Well, I tried this, and instructions (ODSI set to debug and WLS logging of debug level log level) and it worked. Have you tried that? Doing a job?

    Now you're showing a function. Have you tried setting log levels?

    Where are you looking for results? The will NOT in the Console for ODSI Studio Test view (I guess that's where you're looking). They will be in the WLS log file if you have configured the log WLS-> Log level = debug file. They will be in the WLS (stdout/stderr) console if you have configured this Log level = debug.

    I believe that the trace function is implementation specific, then there is no such thing as a generic example.

    -Mike

  • How to see the content of what's currently on my iCloud of this site

    How to see the content of what's currently on my iCloud.  I would like to see these files presented in a display of file manager type in order to sort and remove if necessary.

    Go to iCloud.com, then click on your iCloud drive icon.  I hope this is what you mean or what you are looking for.

    iCloud Drive FAQ - Apple Support

  • How to see the old registered devices?

    How to see the list of disabled devices?

    If you have devices that are associated with your Apple ID, to the use of the content purchased from iTunes Store or access to subscription services, I don't think that there is a list of previously associated devices that are no longer associated.  I don't know what you mean by devices 'off '.

    If you ask about "old devices registered" on your Apple ID support profile, they must always be there.  This list is mainly for the purpose of support services.  You can check here

    https://supportprofile.Apple.com/

  • How to see the level of ink for a dell v515w printer?

    Separated from this thread.

    How to see the level of ink for a dell v515w printer?

    Hi Albert,

    I appreciate your time display. You can refer to the manual for more information. http://www.Dell.com/Ed/business/p/Dell-V515w/PD

    To better help, contact Dell technical support.

    http://en.community.Dell.com/support-forums/peripherals/

    Thank you.

  • All the fonts/writing are gibberish and I can't not as what is written, so I can't change anything on my vista, how to see the writing again if I can read? Thank you

    All the fonts/writing are gibberish and I can't not as what is written, so I can't change anything on my vista, how to see the writing again if I can read? Thank you

    Try cleartype youre settings, follow this link.

    http://www.Microsoft.com/en-us/typography/default.aspx

    Also, look for downloads 'police' as you need...

    1, select "cleartype online setting" you will probably get a download popup, install the

    Update...

  • How can see the motherboard serial number in windows 7

    Salvation;

    I need how can see the serial number of the motherboard in windows 7
    I look forward to help me
    Thank you...

    You will most likely need remove the left side panel and look at the motherboard to determine the serial number.

  • How I see the preview image of my PDF documents?

    How I see the preview image of my PDF documents?

    Hi josepm26085232,

    Preview of thumbnails has been disabled in the latest Adobe Acrobat Reader DC due to security problem.

    If you want this feature, you will need to uninstall the latest version & reinstall the old version of the Adobe - Adobe Acrobat Reader DC Distributiondrive.

    Kind regards
    Nicos

  • How to see the info of waiting events. After executing a statement select query

    Hello

    How to see the info of waiting events. After running a select query. Is there a setting to the value of this option?
    And I also want to see the following info. in the trace file. For this, what are the settings I need to adjust to the right?
    SELECT * FROM emp, dept 
    WHERE emp.deptno = dept.deptno;
    
    call   count      cpu    elapsed     disk    query current    rows
    ---- -------  -------  --------- -------- -------- -------  ------
    Parse      1     0.16      0.29         3       13       0       0
    Execute    1     0.00      0.00         0        0       0       0
    Fetch      1     0.03      0.26         2        2       4      14 
     
    Misses in library cache during parse: 1 
    Parsing user id: (8) SCOTT 
    Concerning
    Evelyne

    For

    SQL > show parameter dump;

    ORA-00942: table or view does not exist
    >
    Use

     GRANT SEECT ON v_$parameter to Your_User_Name
    

    For

    SQL > ALTER SESSION SET EVENTS = 10046 trace name forever, context level 12';

    ERROR:
    ORA-01031: insufficient privileges
    >
    Use

     GRANT ALTER SESSION to your_user
    
  • How to see the output of an associative array in procedure

    Hello
    I tried the following code
    And confused about the research at the exit of the associative array.
    CREATE OR REPLACE PACKAGE test_pak1
    AS
       FUNCTION map_object (obj_typ_in VARCHAR2)
          RETURN VARCHAR2;
    
       CURSOR c_c1
       IS
          SELECT * FROM emp;
    
       TYPE test_ttyp IS TABLE OF c_c1%ROWTYPE
                            INDEX BY PLS_INTEGER;
    
       PROCEDURE search_obj (obj_type VARCHAR2);
    END;
    
    CREATE OR REPLACE PACKAGE BODY test_pak1
    AS
       FUNCTION map_object (obj_typ_in VARCHAR2)
          RETURN VARCHAR2
       IS
       BEGIN
          dopl ('Hello');
          RETURN abc;
       END;
    
       PROCEDURE search_obj (obj_type VARCHAR2)
       IS
          test_tab   test_ttyp;
       BEGIN
            DOPL  (test_tab);
          end;
       END;
    In the above code, I want to see the output of the test_tab located in the search_obj procedure.

    could you please help me in this

    Thank you

    Hi, smile,

    If you want to see records, you must put the lines in your table. Here's a solution: in this solution, I only edit the search_obj procedure of your package like this:

     PROCEDURE search_obj (obj_type VARCHAR2)
       IS
          test_tab   test_ttyp;
          test_tab_r   c_c1%ROWTYPE;
       BEGIN
            --test_tab;
            --Here we put something in test_tab
            OPEN c_c1;
    
            LOOP
                 Fetch c_c1 into test_tab_r;
                 exit when c_c1%NOTFOUND;
                 test_tab(test_tab.COUNT + 1) := test_tab_r;
             END LOOP;
            CLOSE c_c1;   
    
            FOR i IN 1 .. test_tab.COUNT LOOP
              dbms_output.put_line(test_tab(i).empno);
           END LOOP;
    
       END;
    

    Here is the result:

    SQL> exec test_pak1.search_obj('parameter_not_used_in_the_procedure');
    7369
    7499
    7521
    7566
    7654
    7698
    7782
    7788
    7839
    7844
    7876
    7900
    7902
    7934
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • How to see the result in sql * more

    Hello
    IAM running a procedure to sql * more...
    I put quite a few DBMS .put line-out inside the proc for purporse debugging
    before running, I said set serveroutput on;
    the procedure is done correctly, but I don't see any output

    It just displays the procedure completed successfully

    How can I see the output

    concerning
    REDA

    Hello reda,.

    You are absolutely sure that the procedure actually runs one of these DBMS_OUTPUTs, that is, you are sure that alternate paths through your procedure are not taken?

    To confirm, put a DBMS_OUTPUT at the very beginning of your procedure, to see if that print, which should be if you set serveroutput on it.

  • How to see the batteries on an iPad Pro specifically the pencil of Apple?

    iPad Pro; 9.3.3 iOS; I can't find "Batteries" on my record of Notifications to see how much power I have left on my iPhone and Apple pencil

    Humble Tad Hello,

    Thank you for using communities of Apple Support.

    From your post, I understand that you are not able to locate the section on your iPad Pro that shows you your battery info Apple pencil. I know how it is important for you to know how much battery is left for you to use. You will not be able to see the information of the battery for an iPhone, but you will see the iPad Pro and Apple pencil battery information. Please see below for more information:

    Use the pencil to Apple with iPad Pro

    To see the load your pencil Apple left, check the view of Widgets in the Notifications on your iPad Pro.

    See you soon

  • How to see the profiles of school boards

    Hello, I would like to know how to see what type of profile you are running on your iphone because some companies record a profile on your device which sometimes ask you to change your access code in X-number of days.

    A profile would appear in settings if it is installed on your device, but if you have an Exchange account on the device, it can be run via the Exchange account as part of your process of connection for your mail, calendar, etc... In this case, you would not see a specific profile.

  • How to see the report on health v29 firefox?

    My firefox works slowly and I wanted to see the report on the health, but I got lost in the new interface of firefox, of course I really like it but right now I'm lost and cannot find how to open firefox report health function.

    So can someone point me in the right direction?

    Thanks in advance

    You can type about: healthreport in the address bar and press ENTER.

    Also try to read Firefox is slow - how to make it faster

Maybe you are looking for