why we use objects?

I wonder why the first block gives an error while second works very well. Why we use objects? I though that the nested tables are sufficient to use the table features.

First block
DECLARE
   TYPE parties_t IS TABLE OF plch_parties%ROWTYPE;

   l_parties   parties_t;
BEGIN
   SELECT *
     BULK COLLECT INTO l_parties
     FROM plch_parties
    WHERE dancing_encouraged = 'Y';

   INSERT INTO plch_dance_parties
      SELECT party_name, max_attendees FROM TABLE (l_parties);

   plch_show_count;
END;
/
Second block
CREATE TYPE plch_parties_ot IS OBJECT
(
   party_name VARCHAR2 (100),
   max_attendees INTEGER,
   dancing_encouraged CHAR (1)
)
/

CREATE TYPE plch_parties_nt IS TABLE OF plch_parties_ot
/

DECLARE
   l_parties   plch_parties_nt;
BEGIN
   SELECT plch_parties_ot (
              party_name, max_attendees, dancing_encouraged)
     BULK COLLECT INTO l_parties
     FROM plch_parties
    WHERE dancing_encouraged = 'Y';

   INSERT INTO plch_dance_parties
      SELECT party_name, max_attendees FROM TABLE (l_parties);
END;
/
Thank you

You try to refer to a data structure of PL/SQL to a SQL query.
The SQL engine doesn't know how to deal with a structure of PL/SQL locally defined.

I heard this restriction would be removed in the next version if (12.1).

Tags: Database

Similar Questions

  • Why my smart objects lose shape when it is changed?

    DSP 10 - windows.

    I have a project that contains objects communicating shaped like a magazine, so that the pages are forms bizarre models.

    When I click on a smart object and modify the content and open and then save again, the original object loses its unique shape and ends simply by the place.

    Normally I would merge the smart object open, but tried to leave in layers and various other options, but every time I have save the smart object updated (even if I just change the color of the smart object) when I have the resave, it loses shape magazine page.

    Normally, I would say that this problem is in the file, but I have had this experience on more than a sham.

    Dynamic objects appear as they should be relatively easy, what don't get me?

    klipKG_001.jpg

    This is the original file... you can see the dynamic object from the point of view

    klipKG_004.jpg

    so I open the smart object, paste in my art, flatten and save.  (I also tried do not flatten)

    klipKG_005.jpg

    in any case, when I save the smart object I lose shape and just get a result of squares.  UGGG.

    What Miss me?

    Recently, I gave a moment to complain on the forums of non-functioning and I did a few years ago, vowed not to come until they are fixed. But the person with a good heart in me can't let somebody question remain unanswered. (I used as one of the posters who have contributed regularly here. Consider this a small dose of expertise, the forums are missing on ignoring the pleas of users like me who made them useful and functional compared to management that makes them unwieldy and simply not work!)

    The reason why your smart objects lose their point of view is because they were created in a later version of Photoshop with a change of perspective that is not supported in earlier versions. (Your CS3, for example) To make it backward compatible and editable in your version, the person who uses the latest version of CS must simulate the perspective transformation with the functions of 'chain', then you will be able to update your smart objects with no problems.

  • I can't use a website should I use with Firefox 5.0. So, I need to uninstall and go back to 3.5 or 3.6. Please notify. Also, my control panel blocks from Windows Explorer a PMP. That's why I use Firefox instead. Thanks for any help!

    I can't use a website should I use with Firefox 5.0. So, I need to uninstall and go back to 3.5 or 3.6. Please notify. Also, my control panel blocks from Windows Explorer a PMP. That's why I use Firefox instead. Thanks for any help!

    I thought it would be FAFSA is causing your problem.

    Install Portable Firefox 3.6.x on your hard drive to a Web site. This will not affect any of your current Firefox installation.

    http://PortableApps.com/apps/Internet/firefox_portable/localization#legacy36

  • Reading Cluster using Objective C

    I want to read a value of cluster created by LabView from a specific IP address using Objective-C on an iPad. How a cluster is packed so that I have to break the cluster on the side of the Objective-C? The data that I have to read contains a mass of different types of digital data (8 bit wide 16-bit integer, number of details of 6 digits and precision 15-digit numbers), 3 ropes and 2 Boolean values 1 32-bit integer.

    If they simply send the cluster, I think you'll have to reverse engineer the format used by LabVIEW. If I remember correctly, it's a concept similar to what I suggested. However I do know not all values NOR for their data types and other ID. Do you know how the LabVIEW is written? They flatten a chain when sending data? Knowing it would help.

    You should also be aware that someone changes the cluster (worst case simply rearranges the elements) your data content will change. The data will be reorganized and there is no way in a simple don't flatten to a string (which I think they do) you will be able to detect it.

    Relying on the order from a cluster can be misleading because there is nothing to help enforce the format of the data or an easy way to communicate it (think header file) to the C code.

  • Why we use the Cisco Voice environment CUBE

    Hi all

    Hope you all are doing well.

    (1) can someone describer that's why we use CUBE in Cisco voice environment and this is the main purpose? Configure the steps?

    (2) what is allowed and what type of license that we use in the world of VOICE?

    (3) features and integration between the CUCM CUPS CUPS?

    Thank you

    Arjun keita

    This very open Q

    To read a bit of paper on the product

    http://www.Cisco.com/c/en/us/products/unified-communications/unified-BOR...

    and no further questions, see the Q & A

    https://supportforums.Cisco.com/document/69976/frequently-asked-question...

    BR
    Mamdouh

  • Why we use a Vanity URL on the landing page.

    Hello


    Why we use a Vanity URL on the landing page.



    Thank you

    Sanjiv

    Hi Sanjiv,

    Vanity URL is used to hide a number of landing page and to show a clean landing page or particular URL after the domain name.

    Thank you

    Eloqua Expert

  • Why we use JMS instead of using HTTP/SOAP WebService

    Hello

    Why we use JMS/SOAP instead of using HTTP/SOAP HTTP being more good on the Protocol TCP/IP (why seller enjoy JMS)

    Why we use JMS rather than to use the direct database because the database JMS use internally to store its payload.

    I've read these post

    < http://Java.dzone.com/articles/performance-soaphttp-vs-soapjm > and

    < http://it.Toolbox.com/blogs/the-SOA-blog/Web-Services-http-vs-JMS-19110 >

    But in reality most of the things we can achieve in the two example

    Consider using SOAP http:

    • Externally facing web services (for example, customers or suppliers) (
    ) in JMS also is good, that we can do )
    • For simple point-to-point and services stateless (
    ) we have point to point in JMS queues using )
    • Where you need a thin client with no installation of MOM

    Consider using SOAP over JMS for:

    • High-volume distributed messaging (
    ) Why for high volume JMS is required for HTTP based Web Service ? )

    • Asynchronous messaging (based HTTP web service can also be asynchronous and we can use the correlation machining inside()

    • Where a transaction limit is necessary in the middleware (which is operation limit, it is not possible with the basic HTTP web service ? ) )


    • Where the message consumers are slower than the producers (the location of that point in difference( )
    • Guarantee deliver ()that we can achieve in web service basic HTTP using the WS-Reliable messaging standard so how this point said difference( )

    • A one-time delivery of messages (what back "only once, sending a message" threat and is not possible with the web service HTTP based ? ) )


    • Publish/subscribe (
    ) this mechanism broad casting can be done using HTTP based web service also if all applicant read only the recording of database ) (Same JMS use the internal database)


    • Distributed systems of peers who can sometimes be disconnected (
    ) This also good for basic HTTP web service, we can use correlation sets (asynchronous service) then even if the following resource is not in service expect that it will be available and continue run more. so, how that pint is indicative of difference )


    Someone tell me really what is the real benefits or difference and why and where we use JMS Web service instead of HTTP based Web (real difference) service base



    Thank you

    Hello

    It is difficult to understand your point with this discussion... I don't see what exactly you're trying to lawyer he y... You can obviously use a table knife to unscrew a screw, it will probably work for 90% of cases... But you do not use the right tool for the job, and it can potentially become very difficult... You can even cut a finger and wish you had used the tool that was actually designed to work you have to do... What you're trying to find that it is the best tool for your use case, the options are endless...

    See you soon,.

    Vlad

  • Why short use SOAP based instead of REST web services

    I have a very basic question about why short uses web services SOAP based instead of RESTING the REST is very light?

    Kumar,

    To a large extent, the choice of the web service protocol is orthogonal to how short Server communicates with Studio (aka short discovered Information).  EID has been designed as a set of tightly coupled of capabilites and we not usually expect users to develop a custom front-end that would require a knowledge of the workings of.

    Ryan S. - EID PM

  • why I use the new cc photoshop cannot open, have and pdf

    why I use the new cc photoshop cannot open have and pdf.

    and more slow then former execution

    According to your records, you bought the CC for photography program under the same ID from Adobe Photoshop.

    It gives you access to use Photoshop & light room.

    Concerning

    Stéphane

  • How and why to use Xpn files in Photoshop cc 2014

    How and why to use Xpn files in Photoshop cc 2014. in windows & SP2. I got about 20. XPN files with Photoshop course. I think they're PS presets. I have no idea what to do with them.

    Thank you

    It seems that those who are for photoshop Lightroom, which is a different program of photoshop cc 2014.

    Although it doesn't seem to be of the presets included this work in photoshop as well.

    See the Read Me First on the Presets

    http://www.PhotoSerge.com/Tutorial/lightroom_presets_complete_package

  • Why fields view object cannot display in the data control?

    Hello
    Work in jdev 11.1.2.3.0.
    I create two objects from view of the entities under the project module.
    and see the AppModule.xml as follows:
    ..
    < ViewUsage
    Name = "TransAccountVO1".
    ViewObjectName = "Project1. TransAccountVO "/ >"
    < ViewUsage
    Name = "TransAccountBillVO1".
    ViewObjectName = "Project1. TransAccountBillVO "/ >"
    ...
    Under the control of data panel shows these two nodes:
    -TransAccountVO1
    -id
    -name
    ---..
    + Operation
    + Named criteria

    -TransAccountBillVO1
    + operations
    + Named criteria,

    THE first node is ok, but the second miss (node TransaccountBillVO1) areas.
    Why fields view object cannot display in the data control?

    Thanks in advance.

    delete and Add again... the value editable forever.

  • why we use the symbol $ java variable?

    his_$ account_tota, $ b... can u give an explanation for this variable. What is the symbol of $ use? Why we use the symbol $ java variable...
    I need a clear and simple explanation for example...: P

    No real reason, you can do it if you want. But you don't have to - I certainly didn't, and I rarely see code it does.

    You should take the time to find a way to find information. For example, I just typed 'java variable dollar' in google and ended up with this as the first shot:

    http://docs.Oracle.com/javase/tutorial/Java/nutsandbolts/variables.html

    I quote:

    "In addition, the character dollar sign, by convention, is never used at all."

  • why we use Parent parent adjs total parent in the dimension value in HFM

    Hi Experts

    Can someone give me please an explanation of why we use Parent, parent adjs and total in the dimension value in HFM?

    concerning
    Smilee

    Hello
    As a quick response, when you post a journal to adjustment, this setting affects all parent entities. On the contrary, if you post an adjustment of newspaper [Adjs Parent] then you must also select which parent entities should be affected by the review (while all the other parents will not be affected). So that this discussion is relevant, you must have your entity shared as part of several parents. If you're a single parent so this does not apply. Note that, to make this work, you must have active AllowAdjFromChildren

  • How and why CB uses internet proxy?

    Hello!

    CB user guide contains the following ' 4 If a proxy is required for access to the internet, type y and provide the details of the proxy. "

    How and why CB uses internet proxy?

    --

    Igor Nemilostivy

    Hello

    For version 1.0 of the CB, CB does not connect to the internet. There is therefore no need to provide details of the proxy server.

    "A proxy server is required to access the Internet? y/n :"----

  • Why not use the static methods - example

    Hello world

    I would like to continue the below thread about "why not use static methods.
    Why not use the static methods
    with the concrete example.

    In my small application, I need to be able to send keystrokes. (java.awt.Robot class is used for this)
    I created the following class for these "operations" with static methods:
    public class KeyboardInput {
    
         private static Robot r;
         static {
              try {
                   r = new Robot();
              } catch (AWTException e) {
                   throw new RuntimeException(e + "Robot couldn't be initialized.");
              }
         }
         
         public static void wait(int millis){
              r.delay(millis);
         }
         
         public static void copy() {
              r.keyPress(KeyEvent.VK_CONTROL);
              r.keyPress(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_C);
              r.keyRelease(KeyEvent.VK_CONTROL);
         }
    
         public static void altTab() {
              r.keyPress(KeyEvent.VK_ALT);
              r.keyPress(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_TAB);
              r.keyRelease(KeyEvent.VK_ALT);
         }
    
                   // more methods like  paste(), tab(), shiftTab(), rightArrow()
    }
    You think it's a good solution? How could it be improved? I saw something Singleton vs somewhere of static methods. Wouldn't be better to use Singleton?

    Thanks for your comments in advance.
    lemonboston

    maheshguruswamy wrote:

    lemonboston wrote:

    maheshguruswamy wrote:
    I think a singleton might be a better approach for you. Just kill the public constructor, and provide a getInstance method to provide late initialization.

    Maheshguruswamy thanks for the tips on the steps create a singleton of this class.
    Perhaps you could say also why do you say that it would be preferable to use singleton? What is behind it? Thank you!

    In short, it seems to me that a single instance of your class will be able to coordinate actions across your entire application. If a singleton should be sufficient.

    But who doesn't answer why he expected prefer a singleton instead of a bunch of static methods. Functionally, the two are almost identical. In both cases, there is that a single 'thing' to call methods - either a single instance of the class or the class itself.

    To answer the question, the main reason to use a Singleton on a class of static methods is the same reason readers much of not static vs static decisions: polymorphism.

    If you use a Singleton (and and interface), you can do something like this:

    KeyboardInput kbi = get_some_instance_of_some_class_that_implements_KeyboardInput_somehow_maybe_from_a_factory();
    

    And then everything calling public methods of KBI has to know that there an implementor of this interface, without worrying about what concrete class is, and you can replace some implementation is appropriate in a given context. If you do not need to do, then the approach of the static method is probably enough.

    There are other reasons that may suggest a Singleton - serialization, persistence, use as a JavaBean pop to mind - but they are less frequent and less convincing in my experience.

    And finally, if this thing keeps updated a State between method calls, even if you can manage it with static member variables, it is more in line with the OO paradigm to make them non-static fields of an instance of this class.

Maybe you are looking for