How to fill the value in the nested table by using the object type


Hi gurus

I created an object type and able to fill the values in it, now I want to create a nested table type of this object and fill it but looks like I'm doing something wrong, see my code below.

Code example

CREATE or REPLACE TYPE countries_o
AS
OBJECT
(
COUNTRY_ID TANK (2 BYTES),
COUNTRY_NAME VARCHAR2 (40 BYTE),
REGION_ID NUMBER);
/

create or replace type countries_t is table of the countries_o;

/

CREATE OR REPLACE

ABC of the PROCEDURE

IS

v_print countries_t; -: = arr_countries_t('01','Aus',1);

BEGIN

v_print: = countries_t('01','A',11);

DBMS_OUTPUT. Put_line (v_print. COUNTRY_ID | v_print. COUNTRY_NAME | v_print. REGION_ID);

END;

/

Error

  • Error (6.3): PL/SQL: statement ignored
  • Error (6,12): PLS-00306: wrong number or types of arguments in the call to 'COUNTRIES_T '.
  • Error (7.3): PL/SQL: statement ignored
  • Error (7.32): PLS-00302: component 'COUNTRY_ID' must be declared

Thanks in advance

Concerning

Muzz

Hi user,

Here is another method that you can try-

CREATE OR REPLACE

ABC of the PROCEDURE

IS

v_print countries_t: = countries_t (countries_o('01','A',11));

BEGIN

DBMS_OUTPUT. Put_line (v_print (1).) COUNTRY_ID | v_print (1). COUNTRY_NAME | v_print (1). REGION_ID); -you're accessinf the first element of the nested table, which in turn points to the object.

END;

In the sections of the declaration you have assigned values to the nested table.

Kind regards
Maxou

Tags: Database

Similar Questions

  • How to fill the discharge battery on Qosmo G30?

    Hello

    How to fill the discharge battery on Qosmo G30?

    Thank you

    Hello

    Disconnect the power adapter and run the notebook until it automatically stops.
    In addition, you should disable or change the battery alert in Windows power management.

  • How to fill the canvas with lines

    < mx:Canvas id = "b1" x = "10" y = "10" height = "40" width = "300" borderStyle = "solid" borderColor = "black" / >

    When I want to draw lines with difference of 15 pixels to fill the entire canvas I wrote the following

    for (var i: int = b1.x + 15; i < b1.x + b1.width; i = i + 15)
    {
    var line1:UIComponent = new UIComponent();
    var lineThickness1:Number = 1;
    var lineColor1:Number = 0 x 000000;
    var lineAlpha1:Number = 1;
    LINE1. Graphics.LineStyle (lineThickness1, lineColor1, lineAlpha1);
    LINE1. Graphics.MoveTo (i, B1.y);
    LINE1. Graphics.LineTo (i, B1.y + B1. Height);
    this.addChild (line1);
    }

    It works very well

    LLY,

    < mx:Canvas id = "b4" x = "600" y = "200" height = "60" width = "300" borderStyle = "solid" borderColor = rotation "black" = "40" / >

    I have the canvas above with the "b4" id only difference is that this canvas rotation

    How to fill the canvas with lines that I just did above?

    Hope this code will help you,

    for(var i: int = 15; i < b4.width; i = i + 15) {
         var line1: UIComponent = new UIComponent();
         var lineThickness1: Number = 1;
         var lineColor1: Number = 0x000000;
         var lineAlpha1: Number = 1;
         line1.graphics.lineStyle(lineThickness1, lineColor1, lineAlpha1);
         line1.graphics.moveTo(i, 0);
         line1.graphics.lineTo(i, b4.height - 1);
         //Add line in canvas instead of main container
         b4.addChild(line1);
    }
    
    
    
  • How to create the object rectangular box with a pure action script.

    How to create the object rectangular box with a pure action script?

    I think, it can be done through the clip library, but I'm not sure. Please, I want to take the suggestion to create a rectangular box as a script through

    Take a new file and write about the first image the code below, it works fine:

    var rect = new Shape();
    rect.graphics.beginFill (0xFF0000);
    rect.graphics.drawRect (0, 0, 100,50);
    rect.graphics.endFill ();

    var MC = new MovieClip();
    mc.addChild (rect);
    addChild (mc);

    If this doesn't solve your problem then paste the error you get

  • Define a map or ORDER method for the object type

    Hi gurus

    I created an object and then its type and then I use this object and type based on line, see below:

    Create the object

    CREATE OR REPLACE

    TYPE test_object

    IS

    OBJECT

    (

    next_appearance_dt DATE, - next_appearance_dt

    youth_adult VARCHAR2 (5) - youth_adult

    ) ;


    /

    Create the object Type

    CREATE or REPLACE TYPE t_docket_object IS TABLE OF THE test_object;

    /

    Create function Pipeline

    FUNCTION to CREATE or REPLACE f_report (p_dt date, p_c_cd VARCHAR2)
    return t_test_object pipeline
    IS
    BEGIN
    FOR J IN)
    Select distinct test_object)
    next_appearance_dt,--862,
    'YOUTH '.
    ) AS test_object
    Jen.next_appearance base
    WHERE 1 = 1
    AND (base.next_appearance_dt = p_dt)
    AND (base.circuit_point_cd = p_c_cd)
    - and cse.information_id = 322
    -ORDER 15 - alias_name
    )

    loop
    PIPE ROW (J.test_object);
    END loop;
    END;

    /

    Run function

    SELECT * FROM TABLE (F_REPORT (TO_DATE('25-sep-2015','dd-mon-yyyy'),'1 '))

    Error

    ORA-22950: cannot ORDER objects without map or ORDER method

    ORA-06512: at "F_REPORT", line 5

    22950 00000 - "cannot ORDER objects without map or ORDER method.

    * Cause: an object type must have a defined for map or ORDER method

    all comparisons other than equality and inequality comparisons.

    * Action: Define a map or ORDER method for the object type

    I know the reason of this error and the reason is that I use the clause separate in my pipeline service, but do not know how to get rid of this error...

    Confuse you the type of table with the object type. He forge

    Select test_object (next_appearance_dt) test_object

    Not:

    Select t_test_object (next_appearance_dt) test_object

    Then:

    SQL > CREATE OR REPLACE
    FUNCTION f_report (DATE p_dt 2,
    3 P_C_CD VARCHAR2
    4                   )
    5 t_test_object of RETURN
    6 IN PIPELINE
    7 EAST
    BEGIN 8
    9 FOR (IN) v_rec
    10 WITH () DID
    11. SELECT TO_DATE('01-jan-2015','dd-mon-yyyy') NEXT_APPEARANCE_DT
    the double 12
    13                                  )
    14 select test_object (next_appearance_dt) test_object
    15                          from  t
    16                      ) LOOP
    PIPE 17 ROW (v_rec.test_object);
    18 END OF LOOP;
    END 19;
    20.

    The function is created.

    SY.

  • Ideas: Insert an error code or give a brief description of what you are trying to accomplish or fix.__media center tv shows only tv in the Center 3 "inches of black on both sides how I filled the screen

    Television Media Center only one tv in the dark on both sides of Center 3 "inches, how do I fill the screen e-machines 600 GB

    Hello, Russell

    Windows Media Center will use as possible while maintaining the proportions of screen space. If you have a TV screen and watch a video 4:3 standard, it will keep the bars on the side.

    You can change the level of zoom in now the keys CTRL and shift and press 'Z' to scroll through the different zoom levels so that it fills the entire screen at your convenience, but keep in mind that you will not be able to see the full image if the proportions of the video does not match your TV.

    David
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • SPA-3102: how to fill the calls from SIP to PSTN and vice versa?

    Hello, since my ISP to my office blocked SIP ports, of I'll try and use it at home where the ATA works very well.

    If I call you ATA installed in my office in the United States (where there is no problem) to my ATA at home in India, I have how to route the call selectively to theFXS port or port FXO of the anti-terrorism Act in India? I I want to answer the call directly using the phone connected to the ATA instrument or make another local call out on the PSTN connection.

    TIA

    You get two accounts of Gizmo.  You put an account on the tab line 1, you put the other account on the PSTN line tab.  If you want to ring the phone attached to the SPA3102, you dial the account tab line 1.  If you want to get the tone to fill an outgoing line PSTN call, you call the account registered on the PSTN line tab.

  • How to fill the space between the four points of the paint method?

    Hello

    I have a graphics application and I want to fill the space between four points by painting method how I can do it.

    can someone help me?

    Try to use Graphics.fillRect which allows to fill using coordinates xy as well as a width and a height.

    If the points are not rectangular, you can try to use Graphics.drawFilledPath.

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#FillRect (int, 20int %, 20int %, 20int %)

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/graphics.html#drawFilledPat... (int [], 20int [], % 20 byte [] % 20int [] %)

  • How to fill the forms/interiors?

    How to describe this written?...

    Let's say you have a form of vector of ring.  It's a circle with a hole in the middle.  Apply a fill does not fill the hole because the hole is not part of the shape, it's just space.  How you fill out that form/space?

    Thank you.

    NJ

    Use live paint.

  • How to fill the gaps with data?

    Hello

    I have data points with a header that contains the ID that I have to report to each row of data.

    I want the ID of the Patient to fill the fields below the rank (where the "Obs" and sequential numbers are) until it reaches the next patient id and then do the same thing again and again until the end.

    Is this possible in a single SQL UPDATE statement?

    Thank you, Daniel

    It's data, it's a column:

    Patient ID = system 1000207 = LVS + ZDV + ddI randomization Date = 26/03/2004
    OBS
    1
    2
    3
    4
    5
    6
    7
    Patient ID = regime 1000751 = LVS + d4T + 3TC randomization Date = 25/02/2004
    OBS
    8
    9
    10
    11
    12
    13
    14
    Patient ID = system 1001379 = LVP + d4T + 3TC randomization Date = 17/03/2004
    OBS
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    etc etc.

    Do you have any column order?

    If not, how you will order the data?

    If you have a column for the classification, the described selection will give you the id of the patient in all lines

    select col1,
           last_value(
              regexp_substr(col1,'Patient ID=([0-9]+)',1,1,null,1) ignore nulls
                    )
            over(order by ord_col) s
    from your_table;
    

    You can then use the MERGER based on the ROWID of update...

    Published by: JAC on May 21, 2013 20:18

  • How to make a value in a temporary table, the match against another table...

    Hi all.

    Please is - can someone provide some guidance on how to...

    1. take a value from a temporary table, the match against another table that contains the first values 'equivalent' value.
    2. take this exchange value, call something (using the slider or the variable?) so I can add to my API to load it into ORACLE...

    Apology of this sounds confusing, I hope you know everything what I want to do...

    Manythanks...

    Steven

    and call the API

    declare
       v number;
    begin
       SELECT oracle_loc_code
          into v
       FROM SU_IEXP_LOCATIONS
          , SU_TEMPLOYEE_DETAILS
       WHERE chris_loc_code =location_id
       ;
       Hr_Assignment_Api.update_emp_asg_criteria (v);
    end;
    
  • How to fill the space between the brush strokes, like you can with a direct trace of paint?

    Hello

    I'm currently under OS X El Captain on my Mac, v. 10.11.1. I use the version of Illustrator 2015.

    I imported a sketch and drawn on a calligraphic brush. (I've created a new for the effects of pulling on my Tablet pressure sensitivity). I assumed that I would be able to use live paint tool to fill in the spaces with the color as you can with a path created from the pen tool. I do not speak only to fill a closed shape, but when the incomplete paths touch. Except when I'll make the paint option, it is up to my strokes applied to regular paths - the pen tool. I used the brush to get the effects, so I really want that stay the same and not be uniform in the thickness of line.

    Basically, is it possible that I can use paint dynamic to fill the white spaces between the lines created with a brush, while keeping the effects of this brush? If I can't use the live paint is there another way I can fill in these spaces as I'm using live paint?

    Thank you very much!

    You will need to develop stories, or duplicate your layer, expand that, make your form of direct painting and delete everything on your new layer, but your new form.

  • Insertion of the stills of DSLR in a mainly video project puts the stills in the video area leaving the video still visible on each side in the background - hints on how to fill the frame completely?

    Inserting still images on a mainly video project causes the video still visible to the left and to the right in the background. What I am doing wrong?

    iansilver

    What version of Premiere Elements and what operating system is involved?

    Can I assume that the stills are on Video 2 video 1 video above?

    If this is the case, place the indicator of the timeline on the still, click on the still image in the editing area monitor to display the bounding box of the image.

    Then use one of the handles of the bounding box to scale the image to fill the monitor space just at the point where the image below is not seen.

    What is your predefined project?

    What are the properties of your source media? And, did you, yourself or the project define the project preset to match the properties of the media source?

    What are the dimensions in pixels of these photos that you import into the project?

    What effect you are trying to create with these stills? Just in case message... the content on the top rail will be visible and content on a lower rail just below it will not be unless there are areas of transparency within the content of the upper track. If there are areas of transparency within the content of the upper track, then the lower content of track appear across these areas. Looks like what happens for you. In addition, Premiere Elements represents transparency as black, not black.

    Please review and study and explain what your goal edition is here. For questions about the questions or the comments above, feel free to ask.

    Thank you.

    RTA

  • How to fill the empty space when the component is not visible or hidden?

    I have several components in BorderPane which can be visible or not using not check box. When I put the component not to be visible, I get an empty space I want to complete resizing the next component. What options are available to configure the components to fill the empty space when the component is defined on .setVisible(false); ?

    So that a node only takes place when it is invisible,

    before you change the visibility property, call:

    node.managedProperty().bind(node.visibileProperty());
    

    Or you can simply remove the node from the graphic scene:

    parent.getChildren().remove(node);
    
  • How to fill the screen when encoding?

    I was coding a short video segment by using H.264 and trying to output to a custom size of 566 x 424.  Whenever I have coding the sequence at that size I get black bars at the top and bottom of the frame and still when I encode any other report size 3 x 4, I do not have.  Y at - it a screen adjustment 'fill' in the encoder in Premiere Pro that I can use?  Why don't I get bars upstairs and down on other 3 x 4 report parameters, and yet I do on this custom size?

    You can see the sample output here: http://www.Southridge.BC.ca/index.aspx

    In the Source of the export settings window tab, crop a few lines of the left and right of the image. It was probably around 6 to 12 pixels per side. Backwards, you can switch between the tabs Source and output to see the effect of the cream.

    Premiere Pro will scale to fit the dimensions of the output image without distorting; When it reaches a limit, it stops at the scale. These lines on the sides of culture will allow Agency until she correctly fills the wide framework.

Maybe you are looking for