is this type of record legal or wise?

I'm trying to make more dynamic registration. Will this work? It compiles in the package specification.
Database is 10g.
TYPE disputes_rec IS RECORD (
      parent_num   customer.parent_num%TYPE,
      cust_num     customer.cust_num%TYPE,
      dis          disputes%ROWTYPE
   );

One way to know whether or not it works is to try it in a simple test case.

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

set serveroutput on
set tab off

declare

TYPE dept_emp_type IS RECORD
( deptno  dept.deptno%type
, dname   dept.dname%type
, emp_rec emp%rowtype
);

v dept_emp_type ;

begin

  v.deptno        := 10 ;
  v.dname         := 'ACCOUNTING' ;
  v.emp_rec.empno := 7369 ;
  v.emp_rec.ename := 'SMITH' ;

  dbms_output.put_line( v.deptno        );
  dbms_output.put_line( v.dname         );
  dbms_output.put_line( v.emp_rec.empno );
  dbms_output.put_line( v.emp_rec.ename );

end;
/

10
ACCOUNTING
7369
SMITH

PL/SQL procedure successfully completed.

The manual also confirms that it is indeed legal.

"PL/SQL allows you to set records that contain objects, collections and other documents (called nested records)."
PL/SQL 10g Release 2 reference manual
http://download-East.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/Collections.htm#sthref1174.

--
Joe Fox
SQL snippets

Tags: Database

Similar Questions

  • SQL * Loader vs external tables to a single file with several types of records (intercalated)

    I have a file of sample data (we will have the a 'true' at a later date and put in day after that) which includes a header, footer, and 5 types of records, that have different columns and lengths, noticed by the first two characters. The different types of records are not all together. On the contrary, some (in particular, two of these types in this example) are intertwined. I am currently working on a SQL * Loader configuration file when it was suggested that I use external tables. I know very little of either, then I would ask what is the best to use.

    Scott@orcl12c > host type test.dat

    header line

    AB, 123, efg

    CD, hij, 456

    Scott@orcl12c > type host test.ctl

    options (Skip = 1)

    load data

    in the ab table truncate where table_name = 'ab'

    fields ended by ',' trailing nullcols

    (table_name filler position (1), col1, col2)

    in the cd table add where table_name = 'cd'

    fields ended by ',' trailing nullcols

    (table_name filler position (1), col3, col4)

    Scott@orcl12c > create table ab

    2 (col1 number,

    3 col2 varchar2 (8))

    4.

    Table created.

    Scott@orcl12c > insert into ab values (1, 'old data')

    2.

    1 line of creation.

    Scott@orcl12c > create table cd

    2 (col3 varchar2 (8))

    3 col4 number)

    4.

    Table created.

    Scott@orcl12c > insert into cd values ("old data", 1).

    2.

    1 line of creation.

    Scott@orcl12c > commit

    2.

    Validation complete.

    Scott@orcl12c > host sqlldr scott/tiger control = test.ctl data = test.dat log = test.log

    SQL * Loader: release 12.1.0.1.0 - Production on Thu Mar 27 13:11:47 2014

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 2

    Table AB:

    1 row loaded successfully.

    Table D:

    1 row loaded successfully.

    Check the log file:

    test.log

    For more information on the charge.

    Scott@orcl12c > select * AB

    2.

    COL1 COL2

    ---------- --------

    EFG 123

    1 selected line.

    Scott@orcl12c > select * from cd

    2.

    COL3 COL4

    -------- ----------

    old data 1

    hij 456

    2 selected lines.

  • SQLError: ' #3115 error: SQL Error.', details:' no table of this type: "contact", operation: 'running', detail "

    Hello
    Simply create database SQLite Database Browser 2.0 B1 after creating the database, when I tried to connect in flash cs4 - with air 1.1 his error show me

    SQLError: ' error #3115: SQL Error.', details:' no table of this type: "contact", operation: 'run', detailID: "2013" I tried to find anywhere but does not have the solution to this "

    my code is here

    import flash.filesystem.File;
    flash.data import. *;
    import flash.data.SQLConnection;
    import flash.data.SQLStatement;
    import flash.data.SQLConnection;

    var dbFile:File is File.applicationStorageDirectory.resol vePath ("mydb.db");.
    var sqlConn:SQLConnection = new SqlConnection ();
    var sqlState:SQLStatement = new SQLStatement();
    sqlConn.open (dbFile);
    sqlState.sqlConnection = sqlConn;
    trace (status sqlConn.connected + "current"); his show 'true' here
    sqlState.text = "SELECT name FROM contact."
    sqlState.execute ();
    var resultArray:Array = sqlState.getResult () .data;

    Thanks in advance

    Hello

    I create my Adobe Air App using Flash Professional CS5 and faced with exactly the same error.

    SQLError: ' #3115 error: SQL Error. ", details:' no table of this type:"categories", operation: 'run', detailID:"2013"

    My SQLite Db was created using Firefox SQLite Manager - extension. The db file is placed in the same folder as the .fla and .swf files. The db has three tables namely: duration and activity categories. I don't understand why I get this error. I even tried to copy paste any other source code of the AS 3.0 but same error reference guide each time.

    The code below is a modified version of the code example in the documentation for reference AS 3.0. Can you suggest how the error above can be fixed?

    / You can also respond to me directly at [email protected]

    /regards

    import flash.data.SQLConnection;

    import flash.data.SQLResult;

    import flash.data.SQLStatement;

    import flash.display.Sprite;

    import flash.events.SQLErrorEvent;

    import flash.events.SQLEvent;

    import flash.filesystem.File;

    var conn: SQLConnection;

    var insertCategory:SQLStatement;

    var dbFile:File;

    //*************************************

    databaseConnect();

    //*************************************

    function databaseConnect (): void

    {

    define where the database file is located

    var appStorage:File = File.applicationStorageDirectory;

    dbFile = appStorage.resolvePath ("MyBudgetCalc.db");

    Open the database connection

    Conn = new SqlConnection ();

    conn.addEventListener (SQLErrorEvent.ERROR, errorHandler);

    conn.addEventListener (SQLEvent.OPEN, openHandler);

    trace ("dbFile.exists:" + dbFile.exists);

    conn.openAsync (dbFile);

    }

    Called when the database is connected

    function openHandler(event:SQLEvent):void

    {

    conn.removeEventListener (SQLEvent.OPEN, openHandler);

    starts a transaction

    Object (this).inputfield.text = "openHandler called..";

    conn.addEventListener (beginHandler, SQLEvent.BEGIN);

    Conn.Begin ();

    trace ("openHandler sweetness...");

    }

    Called when the transaction begins

    function beginHandler(event:SQLEvent):void

    {

    conn.removeEventListener (beginHandler, SQLEvent.BEGIN);

    trace ("beginHandler - SQLEvent message:" + SQLEvent.message);

    Object (this).inputfield.text = "called beginHandler..";

    insertCategory = new SQLStatement();

    insertCategory.sqlConnection = conn;

    insertCategory.text = "INSERT INTO categories (id, name) VALUES (', Auto')";

    insertCategory.execute ();

    insertCategory.addEventListener (SQLEvent.RESULT, insertCategoryHandler);

    insertCategory.addEventListener (SQLErrorEvent.ERROR, errorHandler);

    trace ("sweetness beginHandler..");

    }

    Called after the record of phone number is inserted

    function insertCategoryHandler(event:SQLEvent):void

    {

    insertCategory.removeEventListener (SQLEvent.RESULT, insertCategoryHandler);

    insertCategory.removeEventListener (SQLErrorEvent.ERROR, errorHandler);

    No errors so far, so commit the transaction

    conn.addEventListener (SQLEvent.COMMIT, commitHandler);

    Conn.Commit ();

    trace ("outgoing insertCategoryHandler after conn.commit ()...");

    }

    Called after the transaction validation

    function commitHandler(event:SQLEvent):void

    {

    conn.removeEventListener (SQLEvent.COMMIT, commitHandler);

    trace ("commitHandler() output: all Transaction...");

    }

    Called whenever an error occurs

    function errorHandler(event:SQLErrorEvent):void

    {

    trace ("seizure of errorHandler ()..");

    If a transaction goes, roll back

    If (conn.inTransaction)

    {

    conn.addEventListener (SQLEvent.ROLLBACK, rollbackHandler);

    Conn.Rollback ();

    }

    trace (Event.Error.message);

    trace (Event.Error.Details);

    trace ("sweetness errorHandler()..");

    }

    Called when the transaction is rolled back

    function rollbackHandler(event:SQLEvent):void

    {

    conn.removeEventListener (SQLEvent.ROLLBACK, rollbackHandler);

    }

  • Object type and a Type of record

    What is the difference between the type and the type of recording?
    TYPE OBJ_TYP IS OBJECT (
    ENAME VARCHAR2(30),
    EAGE NUMBER(2),
    ESAL NUMBER
    )
    
    TYPE REC_TYP IS RECORD (
    ENAME VARCHAR2(30),
    EAGE NUMBER(2),
    ESAL NUMBER
    )
    The two even looks like me and just I see the difference in keyword. Is there a functional difference to hide?

    PLS, excuse my stupidity.

    Sunny

    The first is a type of object oriented class. It can have custom constructors, methods and can be used as a type of SQL data in the SQL engine - even as the data type for a SQL column in a table SQL.

    This one is a pure (and clear) record structure - similar to the structure record in Pascal/Ada, or as the struct in C/C++. It can only be used in the engine of PL.

  • When I tried to download, I got a warning that this type of file can harm my computer. I don't understand this.

    I tried to download Firefox and a warning came to the lower left corner of my screen saying: "this type of file can harm your computer. You want deep Firefox... p7.0.1exe anyway? I do not understand why, I would get this warning. I used Firefox in the past but switched to Google Chrome when Zynga support told me it would work better in the game that I played on Facebook.

    Chrome automatically updates this message when you download an exe file. As long as you have downloaded from mozilla.org , it is safe to open

  • My iCloud and shared calendars has stopped working in MS Outlook today.  They worked yesterday.  Now, I get the error message "cannot open this series of records.  The information store cannot be opened?  I tried the fix standard support.

    My iCloud and shared calendars has stopped working in MS Outlook today.  They worked yesterday.  Now, I get the error message "cannot open this series of records.  The information store cannot be opened?  I tried the fix standard support.

    Same thing here.  Looks like Windows did an automatic update during the night, and now nothing iCloud associated work (calendars, contacts, etc.)

    I also noticed that the error message: "could not load file or Assembly ' MOM." Implementation ' or one of its dependencies.  The system cannot find the specified file. "It started after restarting the Windows Update as well.  I imagine that the two are related in the same problem to iCloud.

  • Can we add this type on the Windows Server that comes with the Microsoft Action Pack subscription?

    Can we add this type on the Windows Server that comes with the Microsoft Action Pack subscription?

    Hello

    The question you have posted is related to professional level support. Please visit the link below to find a community that will offer in support of your request:

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer

  • all the functioning.what to stop USB ports causes this type of problem & how do I fix him?

    Can someone help me please, all ports USB to my pc stops functioning and im having problems using flash & Internet communication. I want to know what causes this type of problem & how can I fix him?

    Hello

    · What happens when you use the USB ports?

    · You receive an error message or error code?

    · What is the number and the model of the computer?

    · Do you remember any recent changes on the computer?

    See: advanced troubleshooting tips for General USB for Windows XP problems: http://support.microsoft.com/kb/310575

  • Errorloading C:\WINDOWS\agodulof.dll__I get this message whenever I start my PC. I find no research of this type of error.

    Errorloading C:\WINDOWS\agodulof.dll
    I get this message whenever I start my PC. I find no research of this type of error. Any help would be greatly appreciated.

    30pt,
    Thanks for posting in the Microsoft answers Forum.  Well, you aren't the only one who came empty looking for this error.  I suggest that you perform a clean boot to determine what program is trying to call this dll.

    Follow the steps in this article to resolve problems with a clean boot.

    Advanced problem resolution by clean restart.

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

  • When downloading, by chance, I clicked on "always open this type of file. Now every time I download a file, the computer opens the first file. It's annoying. How can I cancel it?

    I use WIndows Vista on my computer.  When you download a file, I clicked on "always open this type of file.  Now every time I download a file, the computer opens the file first.  How can I cancel it?

    If you mean that you click always ask before opening this type of file which turned off, please see this article if this could help restore function:

    Re-enable always ask before opening this Type of file check box in Windows
    http://helpdeskgeek.com/how-to/re-enable-always-ask-before-opening-this-type-of-file-check-box-in-Windows/

    Scroll down to Windows 7 and Vista

    Important:  The article contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows
    http://support.Microsoft.com/kb/322756/

  • I am trying to install ION Slides2pc scanner. When I try to install the driver, I get a message "system administrator has established policies of prevention of this type of installation. All the answers?

    I'm trying to install the software for a slide ION Slides2pc scanner.  When I try to install the driver I get the following message "system administrator has established policies of prevention of this type of installation.  All the answers?

    Try right click on the installer and selecting 'run as administrator '.

    Support http://www.ionaudio.com/support ION

  • When I try to open a. Using Autocad DWG, I always have to tell windows what program should I use to open this type of file.

    I always have to tell windows what programs use to open some files, even though I always tell him to use this program to open this type of file.

    Hello
     
    You can follow lionk below which may help you to solve your problem:
    Change the programs that Windows uses by default
  • always ask before opening this type of vista - IE 8 - file

    i accidentally disabled the box for a .doc file downloading and can not find how to get back to ask. When I search on net, I always find the XP solution. Under vista I can't find the file types section. so, how can I return it...

    Hello

    Visit this link:
    http://www.Winhelponline.com/blog/reset-the-always-ask-before-opening-this-type-of-file-setting/

    See you soon... :))

  • This program is used to open this type of file; GSG_English.PDF?

    This program is used to open this type of file;  GSG_English.PDF?

    PDF files are opened with Adobe Acrobat Reader, you can download from the Adobe web page for free.

  • When I try to get on IE or Chrome or any web show I get a message saying 'Paint' cannot open this type of file

    I have windows turns on, but when I try to access a browser it has a message for me that "Painting" cannot open this type of file... Even when I try to get on a web view... Even some of my icons resemble small paint pads. Really weird and I make a living on my PC so I don't know what to do. I tried to recover, and he said the same thing... When I go on FB it says I need to update my browsers and it wont let me update all the. I can't really do anything without this message coming... Now, I just got a message from windows Security Center that will not start security... It has to do with a bitmap file

    Looks like you have somehow your file types of website related ('open with') the Paint program.  I couldn't begin to guess how this happened, but here's how to fix this:

    Use the search box to find and open the settings to "Default programs", then scroll down and click "Choose default app settings.  Which opens the control panel 7-style old instead.  Click on your browser in the list, and then click "Set as default" for re - include all types of possible files that the browser again.

Maybe you are looking for

  • Topics series & parallel in MAX

    Hello I have a problem with an installer. Parameter I pour it installs NI DAQmx and NI MAX. The installation goes well but I did not all topics when text MAX in particular the reference series & parallel located in the peripheral topic and interface.

  • Called Labview VI cannot find its controls or subvi

    My application consists of: A standalone .exe that calls graphic VI containing generic and VI controls. My app works very well in the development environment, but when I deploy the secondary can't find it's the generic controls or vi (he uses the pat

  • How to block spam of skymail Inbox

    I tried all different ways of blocking spam in my skymail unsuccessfully all the

  • HP 15-r101na (Energy Star): Please can someone help me get my drivers

    Hi, please someone can advise me on where I can get the specific drivers, I need. I used to have windows 8.1 on it, but have been formatted and put on Win 7 but its telling me I need: Network controller Ethernet controller PCI device PCI encryption/d

  • Before I buy my sister a sansa clip

    Lately my sister thought about purchasong a new mp3, why? She wanted something small like the iPod Shuffle which can be attached to the collar of his canvas. However, the dilemma was between several actors:* The Sansa Clip (with all the hype media ro