How to make reference to the multidimensional array element?

What should I change in the next statement in the dbms_output to display 'Ken' and avoid the error?

Thank you
-Ken
create or replace type kja_person_name_rec as object
( pena_id number(10)
, pers_id number(10)
, pnty_cd varchar2(10)
, first_nm varchar2(100)
, family_nm varchar2(100)
);
/
 
Type created
create or replace type kja_person_name_tbl as table of kja_person_name_rec not null;
/
 
Type created
create or replace type kja_person_rec as object
( pers_id number(10)
, birth_dt date
, person_names kja_person_name_tbl
);
/
 
Type created
create or replace type kja_person_tbl as table of kja_person_rec not null;
/
 
Type created
declare
  l_person_name  kja_person_name_rec;
  l_person_names kja_person_name_tbl;
  l_person       kja_person_rec;
  l_persons      kja_person_tbl;
begin
  l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
  l_person_names := kja_person_name_tbl( l_person_name);
  l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
  l_persons      := kja_person_tbl( l_person);
 
  dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
end;
/
 
declare
  l_person_name  kja_person_name_rec;
  l_person_names kja_person_name_tbl;
  l_person       kja_person_rec;
  l_persons      kja_person_tbl;
begin
  l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
  l_person_names := kja_person_name_tbl( l_person_name);
  l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
  l_persons      := kja_person_tbl( l_person);

  dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
end;
 
ORA-06550: line 13, column 80:
PLS-00302: component 'FIRST_NM' must be declared
ORA-06550: line 13, column 3:
PL/SQL: Statement ignored
 
SQL> 

Hello

Ken Anderson says:
What should I change in the next statement in the dbms_output to display 'Ken' and avoid the error?

Thank you
-Ken

create or replace type kja_person_name_rec as object
( pena_id number(10)
, pers_id number(10)
, pnty_cd varchar2(10)
, first_nm varchar2(100)
, family_nm varchar2(100)
);
/

Type created
create or replace type kja_person_name_tbl as table of kja_person_name_rec not null;
/

Type created
create or replace type kja_person_rec as object
( pers_id number(10)
, birth_dt date
, person_names kja_person_name_tbl
);
/

Type created
create or replace type kja_person_tbl as table of kja_person_rec not null;
/

Type created
declare
l_person_name  kja_person_name_rec;
l_person_names kja_person_name_tbl;
l_person       kja_person_rec;
l_persons      kja_person_tbl;
begin
l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
l_person_names := kja_person_name_tbl( l_person_name);
l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
l_persons      := kja_person_tbl( l_person);

dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
end;
/

declare
l_person_name  kja_person_name_rec;
l_person_names kja_person_name_tbl;
l_person       kja_person_rec;
l_persons      kja_person_tbl;
begin
l_person_name  := kja_person_name_rec( 1, 1, 'LEGAL', 'Ken', 'Anderson');
l_person_names := kja_person_name_tbl( l_person_name);
l_person       := kja_person_rec( 1, to_date( '1955-SEP-22', 'YYYY-MON-DD'), l_person_names);
l_persons      := kja_person_tbl( l_person);

dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);
end;

ORA-06550: line 13, column 80:
PLS-00302: component 'FIRST_NM' must be declared
ORA-06550: line 13, column 3:
PL/SQL: Statement ignored

SQL> 

L_persons (1) .person_names is a kja_person_name_tbl. Kja_person_name_tbls is not first_nms; only kja_person_name_recs do.
Near the end, instead of

   dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names.first_nm);

Try

dbms_output.put_line( 'l_persons(1).first_nm = '|| l_persons(1).person_names(1).first_nm);
--                                                                   added  ^^^

Tags: Database

Similar Questions

  • How to make reference to the start state?

    Hello!

    I have two States in my Application: Start (State of Base) and connected (defined by myself).

    When I put the Application.application.setCurrentState ("logged") I put the State connected, but if I try:

    Application.application.setCurrentState ("start") that it does not work.

    How can I make reference to the start state?

    Thank you very much

    Hello

    To refer to the use of the base state:

    currentState = ";

    Kind regards

    Ivan Alexander PMP

    SR Application engineer.

    FlexAppsStore.com

  • Apex 4.0: In the form of table: how to make reference to the elements?

    Hello
    I have a tabular layout with a certain query. A column in the query (say comm, is not displayed. This column is required in the table

    When a new row is added in the form of tables, I want to add a (complex) value for this column hidden by default.

    I want to add a process (before submitting) to the page.
    How can I make reference to this particular point?


    : P23_COMM: =...

    does not work. It is a column in the query, not a page element.

    Any help appreciated.
    Sincere friendships Erik

    Loop over the hidden PK table, identification of the new line (by finding with PK NULL table th eone) and assign the hidden item corresponding

    Assumung 01 is the primary key column table (use firebug to check this) and 05 is the hidden field

    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
      LOOP
         --Identify new rows
          IF ( APEX_APPLICATION.G_F01(i) IS NULL ) THEN
              APEX_APPLICATION.G_F05(i)  := 
          END IF;
      END LOOP;
    END;
    
  • How to make reference to the external SWF file using if statement?

    I have a main swf file that loads several external SWF file when the user clicks a menu button. Now I want to target a specific swf file to Add an extra library child or of another swf when this specific swf file is loaded. How should I do? What should I put in the stated case?

    ///////////////////////////////////////////////////////////

    var newswf:URLRequest = new URLRequest (".") ("/ swf /" + event.target.name + ".swf");

    Loader.Load (newswf);

    addChild (loader); dynamically load SWFs

    If (newswf == ".") ("/ SWF/pubResCHETNA.swf ') //error here

    {

    FC.buttonMode = true;

    FC.addEventListener (MouseEvent.CLICK, full screen);

    }

    function fullScreen(e:MouseEvent):void

    {

    var loaderF:Loader = new Loader();

    loaderF.load (new URLRequest ("PopupFullscreen.swf"));

    addChild (loaderF);

    }

    ////////////////////////////////////////////////////////

    The State must be newswf.url == the path. However I store event.target.name as a variable and use it in the State. You use "." for your path so the condition probably will always fail.

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • How to make reference to the cantainer object

    Is there a way to refer to the object and other assets based on the position of the target

    var movies:Array = new Array({btn:btn_1,url:"cico.swf"},{btn:btn_2,url:"ianEastwood.swf"});
    
    for (var g:Number = 0; g< btns.length; g++) {
         movies[g].btn.addEventListener(MouseEvent.CLICK, menuClick);
    }
    
    function menuClick(evt:MouseEvent):void {
      eg.      trace(  (evt.target).container Object()    );
         
         
      eg.     trace(    ( (evt.target).cantainer  Object() ).url   );
    
    
    
    Ultimately this is what i want
    var ind:Number = movies.indexOf(the object in the array);
    trace (ind); // should be a number 
    
    
    
    }
    
    
    

    No object btn consists in movies.  It contains objects that contain objects btn.

    use:

    function menuClick(evt:MouseEvent):void {}

    for (var i: uint = 0; i<>

    {if (movies [i]. BTN is evt.currentTarget)}

    trace (i);

    breaking

    }

    }

    }

  • How to make connections on the outputs of the letter of wsn 3202?

    GOOG morning engineers,

    How to make connections on the outputs of the letter of wsn 3202?

    Sorry, I'm very confused by your response.

    You must not something on the power set by program, just connect a power supply to DIO power and mass of DIO.  Then your DIO lines should be able to output values.

    In addition, I think that you may need to configure the output line.  This would be by the project.  I don't remember what it is, but it should be in some menu properties (probably for the specific line of DIO).

  • I downloaded OS Yosemite and threw it on my photoshop 3 - How to make it to the top?

    I downloaded OS Yosemite and threw it on my photoshop 3 - How to make it to the top?

    Assuming you mean ps cs3,

    Downloadalbe installation files available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

    window using the Lightroom 3 link to see these "important Instructions".

  • How can you specify the default value for the undefined array elements

    According to aid LV, the tables have two default values, the normal default value and the default value for the undefined array elements.

    I assume that there must be a way to specify the default value for later, but I can't find it anywhere.  Any ideas?

    I know that you can drag the item out of the table container.  Change the default value on this scalar element.  Then drag the item in table tank.

  • I installed 12 PES.  How can I now download the trial of elements of Prime Minister?

    I installed 12 PES.  How can I now download the trial of elements of Prime Minister?

    OK, I found the answer.  I have re-download PSE 12.  When the download is complete, I can choose to download other software.  I canceled the installation of PES 12 (I had installed yesterday).

  • How to make reference to a column name in the form report

    Hello
    How can I make reference to a column name in the form report. My problem is that "I have a form report that I have the column name when using click on the column name, it must get to the next page with the corresponding values of the column".

    Here, I realized that when I click on the name of the column (in page 1) it brings me to the next page (page 2). but in the next page (P2) I want to display (display only) the corresponding values of the column (page 1) selected, but the values are not editable and shouldn't be in the text box must be in display area.

    So, how can I write a SQL to display single source field. That is to say, how can I consult report form (page 1) in name column.

    Hello

    If you use the link in the column when you click on the need of the column value, you need to navigate to the next page and all the data accordingly select value here.

    Modify the report form and see the top of the page and click on report attribute.

    So now you have the attributes of the columns is to say what are the columns are available in the reports form.

    Click on change column what you need Ie the column when you click on its passage to the next page this column, for example, as mentioned in the previous post "Empname".

    Check the link column and give perspective of values according to your need and click on apply chages.

    Thank you & best regards
    Srikkanth.M

  • How to make reference to a column name in the domain constraint

    When specify us a constraint check (for SQL Server) in a field, we need to enter an expression in the syntax, for example

    Len (Phone) > 7

    Later, the Modeler will exactly this expression in the SQL code. But it would be wrong as a constraint to refer to a column name in the table (which would not be 'phone').
    So, how to make the data name Modeler to a real column in the constraint domain?

    Hello

    Use the % COLUMN as a placeholder column name - len (%COLUMN%) > 7

    Philippe

  • How can I make reference to the parent object of a checkbox?

    I have a checkbox called P105_CBX, with 10 boxes. I have an onClick = "RunThisFunction (this) ' in the attributes of elements in HTML form for this object." When I click on one of the boxes, this function is triggered. An alert at the top of this function tells me that the argument passed to this function is something like P105_CBX_2, which indicates how box has been checked.

    I would LIKE to pass just the name parent of the object checkbox, P105_CBX, as the argument to this function, instead of the name of the box that was checked and I cannot quite understand how. I tried arguments such as this.container this.parentNode, this.parent, this.parents (), this.closest ('ul') and I've yet to find the magic word. After two hours of searching on Google, I'm turning to the experts.

    Thank you!

    Published by: Mark T. 17 March 2012 09:14

    Hello

    I couldn't reproduce your behavior. Maybe this is related to your prob? http://seanmonstar.com/post/707125202/parentNode-misbehavior-in-IE, but more likely, you have already seen it.

    In your code, you may also like to try the function $x_UpTill: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#CHDEGGGI

    function RunThisFunction (cbx) {}
    Alert ($x_UpTill(cbx,_'FIELDSET').id);
    }

  • How to make boxes to the letters for my alias iCloud in Mac Mail

    How to make mailboxes mailbox for my alias iCloud in Mac Mail?

    I have just set up my e-mail address of iCloud for the first time.  I had an Apple account for many years, but had not hitherto iCloud email address.  After that, Mac Mail automatically created an Inbox and an Outbox called, "iCloud" in the Mac Mail.

    Following the instructions I found online from Apple, I created an alias.  I would like to create the mailbox for the alias. How can I do this?

    Because it cannot be changed or deleted, I won't use my "main" iCloud address email for anything whatsoever.  Everything will be done by one or two aliases.

    Thank you for helping.

    You can create a folder for iCloud in the same way, when you create folders for any of your e-mail accounts. However, I suspect that you hope to create an Inbox specially for your alias addresses, which you can not do so. Aliases are aliases for your primary address, they are not different addresses, as such mail to your iCloud address and it's aliases are all moving in the same Inbox.

    What you can do is create a folder for mail addressed to your alias and create a rule to move relevant mail in the Inbox in this folder.

  • How to make part of the video in black and white and the other part in color

    Hello

    So I want to make this black and white video, but keep what inside the rearview mirror in color,

    I used the black and white masked effect around the mirror, but the only problem is that the camera then moves the mask b & w started out where I need it.

    can someone help me please on how to keep track on the edges of the mirror through the video clip of 30 seconds or more

    Thank you

    Screen Shot 2016-03-25 at 3.36.21 PM.png

    You don't say which version of the body you use, but in the newer versions, you use these tools to have body follow the matte for you:

    More info here:

    Masking and tracking in Premiere Pro

    MtD

  • How to make so that the button to show what video showing / loading

    I have a homepage with a video background and a button that returns the user to another page.

    I just have a problem, and it is when you see the page online for a split of a second, you see only the button on a black background before the video is loaded and begins to play. Not really how to on this subject... I recon the button must be visible when the video is displayed or are charged... ?

    I have the following. 'Mybtn' is my button.

    videos of the var: Array = new Array("videos/video.flv");

    Stop();

    stage.scaleMode = StageScaleMode.NO_SCALE;

    internship. Align = StageAlign.TOP_LEFT;

    stage.addEventListener (Event.RESIZE, position);

    BG.video.addEventListener (ProgressEvent.PROGRESS, function() {removeChild (preloader) ;});

    BG.video.addEventListener (Event.COMPLETE, function (e) {BG.video.play ;});)

    BG.video.source = videos [Math.floor (Math.random () * videos.length)];

    BG.video.getVideoPlayer (BG.video.activeVideoPlayerIndex) .smoothing = true;

    position (Event);

    function position (Event): void {}

    var SH = stage.stageHeight;

    var SW = stage.stageWidth;

    var SF = (BG.width)/(BG.height);

    var SS = (SW) / (SH);

    BG.x = SW/2;

    BG.y = HS/2;

    BG.video.x=-BG.video.width/2;

    BG.video.y=-BG.video.height/2;

    If (SS > SF) {}

    BG.width = (SW);

    BG.height = /SF (SW);

    } else {}

    BG.width = (HS) * SF;

    BG.height = (SH);

    }

    Mybtn

    Mybtn.x = SW/2;

    Mybtn.y = HS/2;

    Mybtn.buttonMode = true

    }

    Mybtn.addEventListener (MouseEvent.CLICK, MinFunktion);

    function MinFunktion (Event): void {}

    navigateToURL (new URLRequest ("index3.html"));

    BG.video.stop)

    Mybtn.gotoAndStop (68)

    trace ("you pushed Mybtn");

    }

    use:

    Import fl.video.VideoEvent;

    Mybtn.Visible = false;

    videos of the var: Array = new Array("videos/video.flv");

    Stop();

    stage.scaleMode = StageScaleMode.NO_SCALE;

    internship. Align = StageAlign.TOP_LEFT;

    stage.addEventListener (Event.RESIZE, position);

    BG.video.addEventListener (VideoEvent.READY, readyF);

    BG.video.addEventListener (ProgressEvent.PROGRESS, function() {removeChild (preloader) ;});

    BG.video.addEventListener (Event.COMPLETE, function (e) {BG.video.play ;});)

    BG.video.source = videos [Math.floor (Math.random () * videos.length)];

    BG.video.getVideoPlayer (BG.video.activeVideoPlayerIndex) .smoothing = true;

    position (null);

    function readyF(e:Event):void {}

    Mybtn.Visible = true;

    }

    function position(e:Event):void {/ /}<-you had="" a="" typo="">

    var SH = stage.stageHeight;

    var SW = stage.stageWidth;

    var SF = (BG.width)/(BG.height);

    var SS = (SW) / (SH);

    BG.x = SW/2;

    BG.y = HS/2;

    BG.video.x=-BG.video.width/2;

    BG.video.y=-BG.video.height/2;

    If (SS > SF) {}

    BG.width = (SW);

    BG.height = /SF (SW);

    } else {}

    BG.width = (HS) * SF;

    BG.height = (SH);

    }

    Mybtn

    Mybtn.x = SW/2;

    Mybtn.y = HS/2;

    Mybtn.buttonMode = true

    }

    Mybtn.addEventListener (MouseEvent.CLICK, MinFunktion);

    function MinFunktion (Event): void {}

    navigateToURL (new URLRequest ("index3.html"));

    BG.video.stop)

    Mybtn.gotoAndStop (68)

    trace ("you pushed Mybtn");

    }

Maybe you are looking for

  • Firefox does not start, the error xul.dll thowing

    Hello!Stupid Flash plugin crashed my browser, and now efforts to launch the Firefox browser leads to the following error:Head: 'firefox.exe - Entry Point not found ".Text: "the procedure entry point not found hb_ot_layout_table_get_script_tags in the

  • Update (error80072efd0 and a virus called door backdoor tidsevint___)

    How to rid my computer of this virus.  Also is there asolution updates to windows and windows Defender does not illuminate

  • No volume control icon

    original title: no control volume-a mystery Suddenly, I have no volume control.  When I use the control panal its SNA Manager click "control of colum icon or I get a mess install no volume control.  I have sound I have the latest Realtek. Whence ' vo

  • MS Wireless Laser Mouse 8000 charging light illuminates any

    Recently, I noticed that the witness of charing on my MS Wireless Laser Mouse 8000 is not lit at all when on the charger. Not green, not red, not flashing, not stable. Just nothing. So far, it works again, it seems to charge, but I would like to know

  • Allowing ports through a VPN tunnel question

    I have a VPN tunnel established and I can ping above but my application fails and I think its because I encouraged not 2 ports (ports TCP 19813 and 19814) through. I'm not clear how should I do for allowing these ports through. I need to add a statem