How to declare and use multi dimensional VARRAYs in PLSQL

Hi All,
I am trying to create and use multidimensional varray in plsql code...
can anyone let me know, how can I do this...
Thanks
Krishna

Please do not confuse plsql collections with type objects.Well it's possible with persistent types but nested tables and varrays typically need to be explicitly initialized and extended.
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> CREATE OR REPLACE TYPE name_type_size IS VARRAY (3) OF VARCHAR2 (50);
  2  /
Type created.
SQL> CREATE OR REPLACE TYPE name_type_size_array IS VARRAY (200) OF name_type_size;
  2  /
Type created.
SQL> DECLARE
  2     i_name_type_size_array name_type_size_array :=  name_type_size_array ();
  3  BEGIN
  4     FOR count1 IN 1 .. 200 LOOP
  5
  6        i_name_type_size_array.EXTEND;
  7        i_name_type_size_array (count1) := name_type_size ();
  8
  9        FOR count2 IN 1 .. 3 LOOP
10
11           i_name_type_size_array (count1).EXTEND;
12           i_name_type_size_array (count1) (count2) := count2;
13
14        END LOOP;
15
16     END LOOP;
17  END;
18  /
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • How to declare and use olevar

    Hi
    I need to declare olevar variable and use it. Can anybody kindly help?
    Thanks

    DECLARE
    scan_ole oleobj;
    edit_ole oleobj;
    file_ole oleobj;
    ole_filetype olevar := to_variant(1);
    ole_pagetype olevar := to_variant(1);
    ole_compressiontype olevar :=to_variant(2);
    ole_compressioninfo olevar := to_variant(8);
    dummy NUMBER;
    lst ole2.list_type;
    scancomplete BOOLEAN;
    a NUMBER;
    b VARCHAR2 (2000);
    v_error VARCHAR2 (50);
    scanerror EXCEPTION;
    PRAGMA EXCEPTION_INIT (scanerror, -20010);
    BEGIN
    forms_ole.ACTIVATE_SERVER ('ocx');
    scan_ole := forms_ole.GET_INTERFACE_POINTER ('OCX');
    IF imaging_dimgscan.scanneravailable (scan_ole) <> 0
    THEN
    dummy := imaging_dimgscan.startscan (scan_ole);
    scancomplete := TRUE;
    ELSE
    scancomplete := FALSE;
    v_error := 'Scanner not available';
    RAISE scanerror;
    END IF;
    IF scancomplete
    THEN
    forms_ole.ACTIVATE_SERVER ('EDIT');
    edit_ole := forms_ole.GET_INTERFACE_POINTER ('EDIT');
    b := imaging_dimgscan.destimagecontrol (edit_ole);
    imaging_dimgscan.destimagecontrol (edit_ole, b);
    a := imaging_dimgscan.closescanner (scan_ole);
    GO_BLOCK ('SCANNED_IMAGES');
    :SYSTEM.message_level := 25;
    forms_ole.ACTIVATE_SERVER ('FILE');
    FILE_ole := forms_ole.GET_INTERFACE_POINTER ('FILE');
    IMAGING_DIMGEDIT.SAVEAS(edit_ole,'C:\scan0001.tif');
    --IMAGING_DIMGEDIT.SaveAs( edit_ole,'C:\scan0001.tif',ole_filetype,ole_pagetype,ole_compressiontype);
    READ_IMAGE_FILE ('C:\scan0001.tif', 'ANY', 'SCANNED_IMAGES.IMAGE_DATA');
    IF NOT FORM_SUCCESS
    THEN
    v_error := ' Could not read image file';
    :SYSTEM.message_level := 0;
    RETURN;
    END IF;
    :SYSTEM.message_level := 0;
    IF :scanned_documents.zoom_amount IS NOT NULL
    THEN
    IMAGE_ZOOM ('SCANNED_IMAGES.image_data',
    zoom_percent,
    :scanned_documents.zoom_amount
    END IF;
    :scanned_images.page_count := TO_NUMBER (:GLOBAL.pagecount);
    :scanned_images.description := 1;
    :scanned_images.page_number := 1;
    END IF;
    EXCEPTION
    WHEN scanerror
    THEN
    a := imaging_dimgscan.closescanner (scan_ole);
    MESSAGE (v_error || ' ' || SQLCODE || ' ' || SQLERRM);
    WHEN OTHERS
    THEN
    a := imaging_dimgscan.closescanner (scan_ole);
    MESSAGE (v_error || ' ' || SQLCODE || ' ' || SQLERRM);
    END;
    The called method
    /*PROCEDURE SaveAs(interface OleObj, Image VARCHAR2, FileType OleVar := OleVar_Null,
         PageType OleVar := OleVar_Null, CompressionType OleVar := OleVar_Null, CompressionInfo OleVar := OleVar_Null,
         SaveAtZoom OleVar := OleVar_Null) IS
    BEGIN
    Init_OleArgs(6);
    Add_OleArg(Image);
    Add_OleArg(FileType);
    Add_OleArg(PageType);
    Add_OleArg(CompressionType);
    Add_OleArg(CompressionInfo);
    Add_OleArg(SaveAtZoom);
    Call_Ole(interface, 343);
    End;
    Where do I go wrong?? The first saveAs works but not the second one!!!

  • How to declare and use a variable in BI Publisher report

    Hi Experts ,
    I have to groups of serial numbers and both group are put in same table and same row one after another , and i have a condition that if no serial number is present in both group than the line of that table should not be appeared ,i used the condition region ,biut this condition region is working in single group case if i put both groups together ,the blaing line appears with its label ,I think if i will have have variable which can count the total present of serial number than I cant put a single condition ,would you please help me ,how can I declare a variable and how can i count the number of serials in both groups ,please find below the example
    <grp1><?SR_NUM1?><end of grp1> <grp2><?SR_NUM2?><end of grp2>
    above example is how i am printing now ,now i need a combined condition where if bot group do not contain any value then this blank line should not appear . thanks in advance.
    Thanks
    Pratap

    Hi ,
    Decalring the Varible :
    <?xdoxslt:set_variable($_XDOCTX, 'var', 0)?>
    Do the calculation :
    <?xdoxslt:set_variable($_XDOCTX,'var', xdoxslt:get_variable($_XDOCTX,'var‘)+ XML columnname)?>
    Display the Variable :
    <?xdoxslt:get_variable($_XDOCTX, 'var')?>
    Declare the varaible before your loop starts.Do the calculation part inside the loop so for each row it will be updated.
    Display the results where you want using the form field and place the display varaible syntax.
    Hope this will helpful for you.
    Thanks,
    Ananth

  • Best way to declare and use internal table

    Hi all,
    As per my knoledge there are various techeniques (Methods) to declare and use the internal tables.
    Please Suggest me the Best way to declaring and using internal table ( WITH EXAMPLE ).
    Please Give the reason as well how the particular method is good ?
    What are benefits of particular method ?
    Thanks in advance.
    Regards
    Raj

    Hello Raj Ahir,
    There are so many methods to declare an internal table.
    Mainly I would like to explain 2 of them mostly used.
    1. Using Work Area and
    2. With header line.
    This with header line concept is not suggestable, because, when we shift the code to oops concept.. it doesn't work... Because OOPS doesn't support the Headerline concept...
    But it all depends on the situation.
    If you are sure that your program doen't make use of the OOPs concept, you can use HEADER LINE concept. If it invols OOPs use WORK AREA concept.
    Now I'l explain these two methods with an example each...
    1. Using Work area.
    TABLES: sflight.
    DATA: it_sflight TYPE TABLE OF sflight.
    DATA: wa_sflight LIKE LINE OF it_sflight.
    SELECT *
      FROM sflight
      INTO it_sflight
      WHERE <condition>.
      LOOP AT it_sflight INTO wa_sflight.
        WRITE / wa_sflight.
      ENDLOOP.
      In this case we have to transfer data into work area wa_sflight.
    We can't access the data from the internal table direclty without work
    area.
    *<===============================================
    2. Using Header line.
      DATA: BEGIN OF it_sflight OCCURS 0,
              carrid LIKE sflight-carrid,
              connid LIKE sflight-connid,
              fldate LIKE sflight-fldate,
            END OF it_sflight.
      SELECT *
        FROM sflight
        INTO it_sflight
        WHERE <condition>.
        LOOP AT it_sflight INTO wa_sflight.
          WRITE / wa_sflight.
        ENDLOOP.
    In this case we can directly access the data from the internal table.
    Here the internal table name represents the header. for each and every
    interation the header line will get filled with new data. If you want to
    represnent the internal table body you can use it_sflight[].
    *<======================================================
    TYPES: BEGIN OF st_sflight,
             carrid LIKE sflight-carrid,
             connid LIKE sflight-connid,
             fldate LIKE sflight-fldate,
           END OF st_sflight.
    DATA: it_sflight TYPE TABLE OF st_sflight,
          wa_sflight LIKE LINE OF it_sflight.
    This is using with work area.
    DATA: it_sflight LIKE sflight OCCURS 0 WITH HEADER LINE.
    This is using header line.
    <b>REWARD THE POINTS IF IT IS HELPFUL.</b>
    Regards
    Sasidhar Reddy Matli.
    Message was edited by: Sasidhar Reddy Matli
            Sasidhar Reddy Matli

  • How to declare and initialize a STRING ARRAY (assign strings to array elements)

    How to declare and initialize a STRING ARRAY (assign desired strings to elements of an array, for example "abc", "def", "ghi", "jkl", etc.) in LabVIEW? I saw a "string array" block in help, but could not find it in the function palette. Does a spreadsheet string have to be in a file (or can it be in a string constant block)? Thank you.

    Hi,
    you can do it in several ways:
    1. Direct way: Create string array control on front panel and type strings in its elements
    2. Programmatically 1: Create string array indicator (or local variable of control), right click on it in block diagram, select "Create constant" from drop down menu. The array constant will appear. Now type values in this constant's strings
    3. Programmatically 1: Use "Build array", "Replace array subset", "Insert into array" or "Initialize array" functions from "Functions->Array" palette.
    And of course you can combine all of these methods.
    Good luck.
    Oleg Chutko.

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • How to install and use a plug-in downloaded from the apple site?

    how to install and use a plug-in downloaded from the apple site?

    Emelie,
    which plug-in do you want to install?
    some of the plug-ins come with an installer on the disk image, you click the installer and it will install it in its proper location.
    For others you move the plug-in into to System Library or your User Library:
      Your Hard disk  > Library > Application Support >Aperture > Plug-Ins > Edit
    or
    Your Home Folder > Library > Application Support >Aperture > Plug-Ins > Edit
    If it is an "Edit" plug-in, it goes into the "Edit" subfolder, "Export" plug-ins into the "Export" subfolder.
    You can tell by the extension, what kind of plug-in it is.
    E.G. BorderFX.ApertureExport is an export plug-in, BorderFXEditPlugin.ApertureEdit an edit plug-in.
    Regards
    Léonie
    P.S. In OS Lion the Libraries are hidden by default: To reveal your User Library activate the Finder and select from the main Finder menu:
        Finder >  Go , then hold down the ⌥-option-key, untill the Library appears in the drop.down menu.
    To show the System Library:
         Finder >  Go > Go to Folder
    then enter   / Library

  • How to create and use mutable array of UInt8

    Hello!
    If I get it right, UInt8 *buffer, buffer - is a pointer to a start of array?
    Then how to create and use mutable array of UInt8 pointers?
    The main target is a creation of the module that will store some byte array requests and will send all of them at the propriate moment.

    I try
    - (void) scheduleRequest:(UInt8 *)request {
    if (!scheduledRequests) scheduledRequests = [[NSMutableArray array] retain];
    [scheduledRequests addObject:request];
    But get warning:"passing argument 1 of 'addObject:' from incompatible pointer type"

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • How to Create  and use of Coherence servers in weblogic serevr 11g (10.3.6)?

    how to Create  and use of Coherence servers in weblogic serevr 11g (10.3.6)?

    See the below discussion
    How to create and use Webservice controls using WSDL in weblogic portal10.3
    Thanks,
    Venkat Sarvabatla

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Could you let me know how to enable and use ITS on SAP ECC5  and ECC6

    Could you let me know how to enable and use ITS on SAP ECC5  and ECC6

    Hello Tina,
    please see here
    in tree select "Installation and Activation"
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/4f/2e6a52c3cdc44d83169b181a9c62ba/frameset.htm">http://help.sap.com/saphelp_nw70/helpdata/en/4f/2e6a52c3cdc44d83169b181a9c62ba/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/b8/2a8d65be7eee4eb66067f8a33d1c8b/frameset.htm">http://help.sap.com/saphelp_nw70/helpdata/en/b8/2a8d65be7eee4eb66067f8a33d1c8b/frameset.htm</a>
    best regards

  • Hello guys..does anybody know how to install and use adobe master collection with the new lion?   I need to use Flash and illustratore, but apparently those programmes are incompatible with the new operative sistem...   I am a new mac users and I'd like t

    Hello guys..does anybody know how to install and use adobe master collection with the new lion?
    I need to use Flash and illustratore, but apparently those programmes are incompatible with the new operative sistem...
    I am a new mac users and I'd like to know if there are other similar programmes I can use with lion!

    Lab79 wrote:
    Are you on Apple's payroll?
    well dude I can only let you know that as I work with those programme I don't have to pay for it is my company that pays the programme I whant to use( that's why I was asking if there where other programmes ..that I could use with lion insted that Illustrator and Flash!)..I know Adobe since 2005 and I can say that Adobs products are very good...I think that if it's an Adobe probleme or fault ..they will solve it very soon...but unfortunally I have the impression that after Jobs passed away Appel decided to change politics..and everything started to go very bad! (see FCP X)..
    good luck with apple dude..
    Where is the Apple problem? I have CS4 and CS5 running perfectly fine on my Macbook Pro. Installed 5 after Lion upgrade. Worth every cent. Adobe did have some catching up to do with Lion but with the CS5.5 update all runs fine. But not yours. So it is a problem with the Lion OS? You say you have been with Adobe since 2005. So you would be aware of all the other issues that Adobe had catching up with past Oss in Mac and Windows then. They get it right, but it is up to them. It is not up to Apple, nor Microsoft for that matter, to run around and check that every software developer in the world is running their business properly.
    And what has politics got to do with anything. Some people just have to blame Software for their poor Hardware maintainence of failure of the same.
    <The only think I can really do is to go back on my old windows...give back this orrible lap top and ask for my money back!>
    Great suggestion. You should go with that one, but good luck getting a refund.
    Bye

  • Need help how to install and use html db

    plz any body can help me i have download htmldb2.0 and want to install and use it with oracle but i do not know how to install and use it first time any body can help me in detail .
    Niazi

    Niazi,
    Included in the 2.0 download are some very comprehensive Installation and Upgrade instructions, I would highly recommend you read those.

  • Formication : How to install and use it

    Hi,
    I need some help. I would like to install and use the Formication CGI but I don't find any documentation usable for someone who never installed any CGI
    Does someone use it and can teach me how to install and use it ? Or maybe there is a documentation somewhere ?
    Thanks for any help

    >I thought it was something well known here.
    I'd never heard of it before.
    Find here the message from the Mac OS X Server Mailing list where I found it.
    Hi all..
    We are currently moving: from WebStar / Lasso 6.x / FMS 5.5 to
    Mac OSX Server / Apache / Lasso.850 / FMSA 8.
    On our WebStar webserver we used FlexMail to handle e-mails sent from a
    html-form, unless we wanted databases/Lasso to get involved.
    I understand FlexMail cannot be used on Apache so I have been looking around
    and searched the list for any tool to do the same job.
    --> What tool to send e-mails directly from web-forms
    with a reasonable option to format the e-mail and
    generate a response page.
    Henning, most of the people that transition from WebSTAR to iTools Apache use Formication.
    Formication is a Perl version of Flexmail, so it has all the features of Flexmail, plus more. It was designed by one of the developers of the original Flexmail.
    When you convert from WebSTAR to Apache you can keep your script intact.
    With iTools, all you need to do is to add the action:
    Flexmail /cgi-bin/formication.pl
    and the .flx handler,
    and the scripts run unchanged.
    >I also found that there is an invisible file
    inside. It's a .htaccess file
    I'd totally missed that, and it's likely to be the
    critical link.
    yes... I supposed it was something important but.... well hidden...
    By default, as shipped by Apple, .htaccess files are
    ignored. You need to explicity enable then in
    /etc/httpd/httpd.conf
    Both 'Action' and 'AddHandler' (the two directives in
    the .htaccess file) require FileInfo override for the
    directory. Therefore, at the very least you need to
    add:
    <pre class=command><Directory /path/to/your/form>
    AllowOverride FileInfo
    Directory></pre>
    to your httpd.conf so that apache will read the
    .htacess file.
    Alternatively, since you have to edit httpd.conf
    anyway, you might just want to add those directives
    to the <Directory> block, which will save Apache
    having to read the file each time the form is used.
    Thanks a lot Camelot,

Maybe you are looking for

  • Password reset option in Portal

    Hi Experts, I would like to integrate password reset option in between help and logout option in masthead. The issue is: 1.how to integrate a link in Masthead which on clicking enables end user to reset Password? 2.is there any coding that i have to

  • None of your website links work, why?

    I have been trying to download the CVIRTE70.zip from your site for 2 days now and the links are dead. Yesterday I contacteed Joe Laxton over the phone and he said that he would send me the file in my e-mail yesterday, but i never heeard anything back

  • MI client on local PC

    Hello guys, I'm a very new MI user and I have a trouble. I would like to install MI client on my local PC and I don't know how to do it. I have downloaded MI25SP16_0-10002889 file from SAP Market Place. I can see two .jar files (JSP and AWT) in the i

  • Mobile accounts and parallels

    Not sure if this is correct forum for this, apologies if it isn't. I have some of my users set up as mobile accounts. These same users are using parallels for WinXP sessions. The issue I have is that when I download an attachment or file under MacOSX

  • Waiting For Activation, help needed.

    Hi, I have bought a iPhone 3G 8GB from ebay. I have checked the IMEI number on "checkmend" and there are no reported problems. It is apparently on o2 but I want to unlock it for use on Vodafone. I have bought a o2 pay as you go sim card so that I can