Ask about the types of objects

Hello

I have a question about the type of object. I want to see the script for the type of object created, that is already stored in the database. How can I see who


Concerning

Hello

So, you can try [DBMS_METADATA. GET_DDL | http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_metada.htm#ARPLS640]...

MHO%xe> create or replace type mytype as object( col varchar2( 10 ));
  2  /

Type is aangemaakt.

Verstreken: 00:00:00.37
MHO%xe> select dbms_metadata.get_ddl('TYPE', 'MYTYPE') from dual;

DBMS_METADATA.GET_DDL('TYPE','MYTYPE')
------------------------------------------------------------------------------

  CREATE OR REPLACE TYPE "MHO"."MYTYPE" as object( col varchar2( 10 ));

Tags: Database

Similar Questions

  • How to get information about the types within a user defined package

    Hi all
    Have a package with some types (user-defined) defined in the package specification. How to get information about the types and
    information about the columns of this type.

    for example:
    Create package mp is

    type t is record (no number is varchar2 (30));

    procedure a (m t out...

    Thanks in advance.

    userg

    G_user wrote:
    the req's, want to build a script dynamically using data dictionary
    so if possible, I take the name of the type within the package specification.

    Let me rephrase - is there a data dictionary to get information on the type defined by the user within a package specification

    Best approach will be to have a standard in the definition of data types.

    Have a process to follow the object definitions in the package if it is mandatory.

  • Need help to identify the type of object in the loop of pl/sql

    Hello

    I need help to identify the Type of object declared beneath a procedure as shown below:

    I need to pass the parameter to the procedure as a TYPE of OBJECT and also refer to variables of Type Object in a loop

    create or replace type TEST_VALIDATION_REC is RECORD (order_num varchar2 (30),)

    number of inventory_item_id

    reserved_YN varchar2 (1).

    error_flag varchar2 (1).

    Error_message varchar2 (2000)

    );

    CREATE OR REPLACE TYPE VALD_TBL AS VARRAY (10000) OF TEST_VALIDATION_REC;

    PROCEDURE ADD_TO_ORD)

    p_lot_number_list IN VALD_TBL,

    p_ord_number IN Varchar2,

    p_user_id in NUMBER: = fnd_profile.value ('USER_ID'),-change 1.10

    p_responsibility_id in NUMBERS: = fnd_profile.value ('RESP_ID'),-change 1.10

    p_application_id IN VARCHAR2: = 'PO',-change 1.10

    x_error_flag OUT Varchar2,

    x_error_msg OUT Varchar2

    )

    In the above procedure, I had the VALD_TBL. Is it OK?

    And how in the loop if the records if I use:

    FOR indx1 IN 1.p_lot_number_list. COUNTY

    LOOP

    BEGIN

    SELECT

    inventory_item_id

    IN

    ln_item_id

    Of

    dummy_lot_tab

    WHERE

    lot_number = p_lot_number_list (indx1); - > how direct the item here?

    EXCEPTION

    WHILE OTHERS THEN

    ln_item_id: = NULL;

    END;

    Records are PL/SQL objects.  They are not the SQL objects.  You can create a SQL TYPE (schema level) as a collection (variable-tables only, tables nested).

    So therefore your first statement is syntactically incorrect

    CREATE OR REPLACE TYPE TEST_VALIDATION_REC IS RECORD
    (order_num VARCHAR2(30),
    inventory_item_id NUMBER,
    reserved_YN VARCHAR2(1),
    error_flag VARCHAR2(1),
    Error_message VARCHAR2(2000)
    );
    

    You must put in an anonymous PL/SQL block or the stored procedure

    DECLARE
    
       TYPE test_validation_rec IS RECORD
       (
        order_num VARCHAR2(30),
        inventory_item_id NUMBER,
        reserved_YN VARCHAR2(1),
        error_flag VARCHAR2(1),
        error_message VARCHAR2(2000)
       );
    
       TYPE vald_tbl iS VARRAY(10000) OF test_validation_rec;
    
       lv_tbl vald_tbl;
    
    BEGIN
    
       lv_tbl := vald_tbl();
      -- insert your code here 
    
    END;
    
  • I already bought the annual plan, I have installed PS, but I can't open the LR, he keeps asking about the serial No.

    I already bought the annual plan, I have installed PS, but I can't open the LR, he keeps asking about the serial No.

    isn't the annual plan for ps and lr?

    Download LR you remove and reinstall your installation of Photoshop Lightroom 5?  Licensing for your membership apply to Lightroom if you install through the creative Cloud Desktop application.  You can find more details at install and update the apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.

  • How to change the type of object?

    I have an object type, as shown below:

    Here are the object and its type

    create or replace type test_object1 as an object
    (
    val1 varchar2 (50).
    val2 varchar2 (50).
    VARCHAR2 (50) val3
    );

    create or replace type test_type1 is table of the test_object1;


    Now I want to change the type of object. I want to increase the size of val1 to varchar2 (100).

    Any body could help for the alter script.

    Thank you
    Lavan

    >
    SQL > alter type test_object1 change attribute (varchar2 (100)) val1;
    >
    Which won't work OPs example. Your example does not include the second type of object that depends on the first type.

    You cannot change the underlying type unless you use the CASCADe or INVALIDATE option.
    >
    change the type of test_object1 change attribute (val1 varchar2 (100)) waterfall;
    >
    See the CASCADE clause in the link provided by Osame
    >
    CASCADE clause

    Specify the CASCADE clause if you want to propagate the type change to the tables and dependent types. Oracle database abandons the statement if errors are found in the dependent types or tables, unless you also specify the FORCE.

    If you change the property of the type between FINAL and NON-FINAL, you must specify this clause to convert data in the tables and dependent columns. Please refer to [NOT] FINAL.

  • [CS2] [VB] How can I determine the type of object to a PageItem?

    I use InDesign CS2 and VBScript

    Loop to the bottom of the PageItems in a Page, I need determine the Type of object (TextFrame, group, GraphicLine... each process) and PageItem accordingly.

    Is there a method/function VBS wiil returns the Type of an object as a string or a value. Or what I need to check the existence/non-existence of a particular property associated with a particular object for this type?

    Alternatively, is there a JavaScript function that will do what I can call VBScript?

    For the record: TypeName is what you need.

    For example, when the cursor is planted in the text return TypeName (Ind.Selection (1)) 'PointInsertion.' When a text block is selected, it returns "TextFrame.

  • How to run the type of object...

    HI team,

    Please let me know how to run pl/SQL object type.

    create or replace TYPE  T_PARTY_ID_LIST  AS TABLE OF T_PARTY_ID; 
    create or replace TYPE  T_PARTY_ID AS OBJECT
     (SEQ NUMBER(10,0)
     ,COUNTRY_ID CHAR(2)
     ,ID VARCHAR2(50)
     ,ID_TYPE VARCHAR(3)
     ,DATE_FROM DATE
     ,DATE_TO DATE
     );
    
    create or replace PROCEDURE P_UPDATE_RICA_COUNT_ID
     (A_PARTY_IDS IN T_PARTY_ID_LIST
     ,A_ICAP_ID  IN number
     ) as
    v_id      sa_id_registration_counts.id%TYPE;
    
    --
    BEGIN
        FOR C IN (SELECT X.id_type, X.ID FROM TABLE (CAST(A_party_ids AS T_PARTY_ID_LIST)) X
                 WHERE X.ID_Type IN ('N','P','B')
                 ORDER BY X.ID_Type)
       LOOP
    --
          BEGIN
     --             
             UPDATE sa_id_registration_counts
             SET no_of_registrations = no_of_registrations-1
             WHERE id = V_ID
                   AND id_type = C.ID_Type;
    --
             IF SQL%ROWCOUNT < 1 THEN
                RAISE NO_DATA_FOUND;
             END IF;
    --
          EXCEPTION
             WHEN NO_DATA_FOUND THEN
                BEGIN
    --
                   INSERT
                   INTO sa_id_registration_counts
                      (id ,id_type,exclude_yn,no_of_registrations)
                   SELECT V_ID,C.ID_Type,'N',1 
                   FROM dual;
    --
                EXCEPTION
                   WHEN OTHERS THEN
                      RAISE_APPLICATION_ERROR(-20000,'Error updating RICA ID count ['||SQLERRM||']');
                END;  
          END;
    --
       END LOOP;  
    --
    END;
    --
    

    I'm trying, but receive an error message

    DECLARE
      A_PARTY_IDS SCOTT.T_PARTY_ID_LIST;
      A_ICAP_ID NUMBER :=12323;
    BEGIN
    
    A_PARTY_IDS.extend(1);
      SELECT T_PARTY_ID(1,'1','1','1',null,null) INTO A_PARTY_IDS(1)
       FROM DUAL;
       
      P_UPDATE_RICA_COUNT_ID(
        A_PARTY_IDS => A_PARTY_IDS,
        A_ICAP_ID => A_ICAP_ID );
    
    END;
    Error report -
    ORA-06531: Reference to uninitialized collection
    

    I do not know why you do what you do that is row-by-row (aka slow-by-slow), when you could do all this in a single merge - something like statement:

    create or replace PROCEDURE P_UPDATE_RICA_COUNT_ID
       (A_PARTY_IDS IN T_PARTY_ID_LIST,
        A_ICAP_ID  IN number)
    as
    begin
      merge into sa_id_registration_counts tgt
      using (select x.id_type, x.id, count(*) cnt
             from   table(cast(a_party_ids as t_party_id_list)) x
             where  x.id_type in ('N', 'P', 'B')
             group by x.id_type, x.id) src
         on (tgt.id_type = src.id_type
             and tgt.id = src.id)
      when matched then
        update set no_of_registrations = no_of_registrations - src.cnt
      when not matched then
        insert (tgt.id, tgt.id_type, tgt.exclude_yn, tgt.no_of_registrations)
        values (src.id, src.id_type, 'N', 1);
    end;
    /
    

    You v_id in your procedure, but you never defined anywhere, for as far as I could tell, so I made a few assumptions about the join condition. You will need to change if necessary.

    Meanwhile, for your procedure, you should do something like:

    DECLARE
      A_PARTY_IDS T_PARTY_ID_LIST := t_party_id_list();  -- initialised the collection here
      A_ICAP_ID NUMBER :=12323;
    BEGIN  
    
      A_PARTY_IDS.extend(1);
      A_PARTY_IDS(1) := T_PARTY_ID(1,'1','1','1',null,null); 
    
      P_UPDATE_RICA_COUNT_ID(
          A_PARTY_IDS => A_PARTY_IDS,
          A_ICAP_ID => A_ICAP_ID );
    end;
    /
    

    Another thing - you seem to like selection of the many double - if you're in PL/SQL, then you can just assign variables directly (overall; there are a few exceptions, depending on your version of the database).

  • Ask about the feature find my phone

    Hello Apple support Team,

    I have a question about the find my iPhone feature which is as follows.

    -If I had put in place the "find my phone" feature when I bought the iPhone and did not open at all in 2-3 months. So that the disconnection of the app itself?

    I ask this because my phone got stolen yesterday and looking for opportunities that could have gone wrong.

    On my laptop, I'm always a corner of yesterday in front of https://www.icloud.com/#find to find the location, but its doesn't help not.

    (PS: this my second time that find my iPhone is not useful for me, I really wish that Apple must lock the turning the option off when the phone is in mode Code (lock mode))

    Waiting for your response.

    Thank you

    Ravi

    If you enable find my iPhone, it will be on except if you have disabled (requires your password to iCloud).  The location will only show if the phone is connected to a network and still has the power.

  • What is the type of object to use for virtual machine model in the Points of Extension?

    Hello

    I added my plugin point of extension vsphere.core. ${objectType} .monitorViews. My plugin is for all types of objects (vm, file, vApp, resourcePool, etc) except the model of the virtual machine. My understanding is that the vm object type would be required for the virtual machine template, but that doesn't seem to be the case. Am I missing something here? Should the plugin appear for the model of the virtual machine when I use the vsphere.core.vm.monitorViews extension point?

    Thanks in advance.

    Kind regards

    Ashutosh

    Sorry, I got confused by your original question. ExtensionPoint id you are looking for is the one for adding views a model virtual machine monitor tab:

    model.monitorViews vSphere.Core.

  • Question about the Type of SQL equivalent Collection Oracle

    (1) I read documentation collections oracle, can I know why the 'STORE AS' clause is used only when creating the table, but not when the object creation?

    Table:

    CREATE TYPE CourseList AS TABLE OF VARCHAR2(64);
    CREATE TABLE department (
      name     VARCHAR2(20),
      director VARCHAR2(20),
      office   VARCHAR2(20),
      courses  CourseList)
      NESTED TABLE courses STORE AS courses_tab;
    

    Object:

    CREATE TYPE CourseList AS TABLE OF VARCHAR2(10)  -- define type
    CREATE TYPE Student AS OBJECT ( -- create object
       id_num  INTEGER(4),
       name    VARCHAR2(25),
       address VARCHAR2(35),
       status CHAR(2),
       courses CourseList)  -- declare nested table as attribute
    

    (2) also can I know what is the difference between OBJECT & RECORD?

    My understanding is that the OBJECT is entity sql where you create and store data in this document, while the RECORDING is PLSQL entity where you group different types of data elements in one?, hope you can give me an example to better understand.

    Thank you.

    Ariean wrote:

    (1) I read documentation collections oracle, can I know why the 'STORE AS' clause is used only when creating the table, but not when the object creation?

    Fix. The column of the course are (similar to an array) collection type. This requires a "nested table" for this column store the list of the values in this column.

    This approach however is an exception to the rule - as it flies in the face of robust and sound design mathematically, relational.

    (2) also can I know what is the difference between OBJECT & RECORD?

    A record is similar to a struct in C/C++. A record contains one or more fields/variables. It's a basic structure for the creation of a 'container of variables' and by the way this container between code units, as oppose to pass individual variables. It is also the basis for the creation of intelligent data structures in structured programming. For example an IP socket structure is a unique smart container consisting of items/variables such as socket, protocol family and type, flags address and so on.

    It is a standard feature in most (if not all) of the structured programming languages - C / C++ and Pascal, Cobol and Visual Basic. PL/SQL is based on the Ada language - and like other members of language (including Pascal), PL/SQL uses the word registration reserve to set a record structure.

    Objects are created in Oracle using the "create or replace type... as object'clause. The correct term is an object oriented class. This differs from a record as a class has data and code. Unlike a record that counts only data.

    Given in a class are called properties. The code of a class is called methods. There are different types of member methods and methods such as the static class constructors, destructive methods.

    Oracle class object is defined using SQL. (Methods) code of this class is set using PL/SQL.

    The classes also supports features like inheritance. Allowing a child class extend the implementation of the parent class. This is not supported by a record structure, beyond a structure that contains another structure as a field attribute. Classes supports the substitution in a child class, the methods of the parent class. As records are composed only of data and not code, there is nothing like ito feature for structures Records.

  • Not sure about the type erasure?

    Hi, my doubt is erase type. Here's the class with generics.
    public class Person<T>{
        
           public T add(T a){
                   System.out.println("happy");
           }
    }
    When compiled type erasure happens. I mean when it is converted to type of class erase file arrives. so the code might be as follows
    public class Person{
    
             public Object add(Object a){
                        System.out.println("happy");
             }
    }
    When the compilation is finished, I started to write the main method and in my main method when I declare
    Person a=new Person()
    the compiler generates a warning saying that the Person class is a type of crude. arguments must be provided to the type parameters. So when there is no generic drugs in the class file, how the compiler identifies that the person is a generic class and arguments must be provided to the type parameters.

    Myriam wrote:
    Now, there is a basic doubt. so far, I thought that the byte-code and the class file is the same. I mean the class file contains the byte-code which is the reason class file runs on all platforms. I also google to know the difference between byte-code and class file but I couldn't find anything. Class file is different from byte-code. If yes what is the class file and what is byte code?

    The class file contains the byte-code indeed - other elements of prudent information to the virtual machine to actually load and interpret the class file.

    http://docs.Oracle.com/javase/specs/JVMs/SE5.0/HTML/ClassFile.doc.html

    You should do a basic study in binary data formats to understand the functioning of applications with those. Generally, you need additional information, which is usually stored in the top of the file (the "header"), to know how to load and interpret the binary data in the file. These header information could contain generic details for example.

    Take a picture as another simple example file: its impossible to properly load the image data if you don't know at least how wide and height of the image is, how many bytes a single pixel takes upward, etc., then you can just dump the binary image of the file data, you must also store the additional header information.

  • determination of the type of object

    I have 2 classes inherit from the same class.
    public abstract class ParentProps {
    }
    
    public class OneProps extends ParentProps {
    }
    
    public class TwoProps extends ParentProps {
    }
    I have another class that has a method that receives an argument of type ParentProps. How will I know if the argument is of the type OneProps or TwoProps?
    public class Test {
       public static void testing(ParentProps props) {
       }
    }
    In the above example how can I know if the object the accessories is passed is a OneProps or a TwoProps object?

    If (OneProps instanceof accessories)

    on the other

  • Need help on the types of objects

    Hello Mr President

    I have one overlay out attributes and the value of the attributes

    DECLARE
    p_user_name_o VARCHAR2 (200);
    p_user_attributes_so manoj_tab_type;

    BEGIN
    p_user_name_o: = Maury
    xxcss_user.getuserattributes (p_user_name_o,
    p_user_attributes_so
    );

    IF (p_user_attributes_so. THERE ARE (1))
    THEN
    BECAUSE me IN p_user_attributes_so. FIRST... p_user_attributes_so. LAST
    LOOP
    Dbms_output.put_line ('attribute ='
    || p_user_attributes_so (i). ATTRIBUTE
    || '; Attribute value ='
    || p_user_attributes_so (i) .attribute_value
    );

    END LOOP;
    END IF;


    END IF;
    END;

    This wrapper will take the username as input and will give you all the attributes of username as the id, USERNAME, ADDRESS, LOCATION of the customer name

    I wanted to shoot only address and location of the envelope above.

    manoj_tab_type is an array of a type of object type

    Can you suggest me how to extract the address and location of theabove packaging. I wanted to print values

    Appreciate your help on the above

    Thanks and greetings
    Manoj Thakur R

    Just add an if STATEMENT stmt in the loop...

    FOR i IN p_user_attributes_so.FIRST .. p_user_attributes_so.LAST
    LOOP
     if p_user_attributes_so.ATTRIBUTE = 'ADDRESS' or p_user_attributes_so.ATTRIBUTE = 'LOCATION' then
       DBMS_OUTPUT.put_line ( 'Attribute='|| p_user_attributes_so.ATTRIBUTE|| '; Attribute Value='|| p_user_attributes_so.attribute_value);
     end if;
    END LOOP;
    

    HTH.

  • About the data binding object

    I've set up a Repeater to display XML data. A single field, called rsvpStatus, is a Boolean value, returning as Y or N. I'd rather see something like YES or no. so I thought I could put in place the following text box:

    < mx:Text text="{Constants.yesNoTranslator[data.rsvpStatus]}"/ >

    and also to set up an associative array reflecting O/N YES/no such as:

    [Bindable]
    public static var yesNoTranslator:Object = {N: 'No', Y: 'Yes'};

    I'm being warned by Flex Builder that:
    "Data binding will not be able to detect changes when using square brackets operator. For array, use ArrayCollection.getItemAt (). »

    Despite this warning, it seems to work.

    My question is:
    I've set up with this warning and assume it is useless, or is there a good reason to change the structure of my code?

    See you soon
    Craig

    Thanks good for this Sreenivas I'm much clearer about all this now.
    all this got me thinking - it would make sense to create a new class, say "ObjectCollection' ObjectProxy extension with a"getItemAt"method to facilitate the fixation on objects in situations such as these:
    (my apologies but no button code to join for some strange reason)


    http://www.Adobe.com/2006/mxml">


    [Bindable]
    public var yesNoTranslator:ObjectCollection = new ObjectCollection({Y:"Yes",N:"No"});)
    [Bindable]
    public var rsvpStatus:String = 'Y ';
    ]]>

    package
    {
    Import mx.utils.ObjectProxy;

    SerializableAttribute public class ObjectCollection extends ObjectProxy
    {
    public void ObjectCollection (point: Object = null, uid:String = null, proxyDepth:int = - 1).
    {
    Super (item, uid, proxyDepth);
    }
    [Bindable (= "propertyChange" event)]
    public void getItemAt(index:String):Object {}
    Return (this [index]);
    }
    }
    }

  • Ask about the policy of replacement of defective parts under warranty (laptop)

    Hello. I had a laptop computer with a HARD drive 320, which became faulty (not totally, in fact) within 2 weeks of purchase. I turned it a HP service center and they got it replaced with a new job. Now everything works fine ATM, however I have noticed that my current HARD drive is a Western Digital while I remember that I had before the failure was a one Seagate. Now, I have a question about the HP replacement policy: is it possible to get another brand of HARD drive altogether in lieu of one that was part of the original shipment or should I have obtained one of the same company (Seagate) otherwise the same exact model of the HARD drive as a replacement?

    They replace it by what they have there at the time, any policy on this.

    This is a forum to a user, no employee of HP here, with the exception of the moderators of the forum.

    WD is currently better than Seagate in my opinion.

    .

Maybe you are looking for