ON the collection of type of the object does not not with GROUP BY

Hello

I have an object of type with the collection defined as:
create or replace type individu_ot as object (
   numero_dossier          number(10),
   code_utilisateur        varchar2(8 char),
   nom                     varchar2(25 char),
   prenom                  varchar2(25 char),
   map member function individu_map return number
)
/

create or replace type body individu_ot is 
   map member function individu_map return number 
   is 
   begin
      return SELF.numero_dossier;
   end individu_map;
end;
/

create or replace type individu_ntt is table of individu_ot
/
When I use simple SQL without no aggregation, the distinct keyword works well and returns me the separate entry of my type of object in the collection:
SQL> select cast(collect(distinct individu_ot(indivmc.numero_dossier, indivmc.idul, indivmc.nom, indivmc.prenom)) as individu_ntt) as distinct_list
from   site_section_cours    sisc
          inner join enseignant_section_mc   ensemc
          on sisc.code_session = ensemc.code_session and
             sisc.numero_reference_section_cours = ensemc.numero_reference_section_cours
          inner join individu_mc indivmc
          on ensemc.numero_dossier_pidm = indivmc.numero_dossier
where  sisc.seq_site_cours = 6

DISTINCT_LIST(NUMERO_DOSSIER,CODE_UTILISATEUR,NOM,PRENOM)                                                                                                                                                                                             
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
INDIVIDU_NTT(INDIVIDU_OT(15,PROF5,Amidala,Padmé))                                                                                                                                                                                                     
1 row selected.
However in SQL with a wide range in group by, the separate no longer works.
SQL> select *
from   (
         select sisc.seq_site_cours,
                cast(collect(distinct individu_ot(indivmc.numero_dossier, indivmc.idul, indivmc.nom, indivmc.prenom)) as individu_ntt) as distinct_list
         from   site_section_cours      sisc
                   inner join enseignant_section_mc   ensemc
                   on sisc.code_session = ensemc.code_session and
                      sisc.numero_reference_section_cours = ensemc.numero_reference_section_cours
                   inner join individu_mc indivmc
                   on ensemc.numero_dossier_pidm = indivmc.numero_dossier
         group by sisc.seq_site_cours
)
where seq_site_cours = 6

SEQ_SITE_COURS DISTINCT_LIST(NUMERO_DOSSIER,CODE_UTILISATEUR,NOM,PRENOM)                                                                                                                                                                                             
-------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
             6 INDIVIDU_NTT(INDIVIDU_OT(15,PROF5,Amidala,Padmé),INDIVIDU_OT(15,PROF5,Amidala,Padmé),INDIVIDU_OT(15,PROF5,Amidala,Padmé),INDIVIDU_OT(15,PROF5,Amidala,Padmé),INDIVIDU_OT(15,PROF5,Amidala,Padmé))                                                     
1 row selected.
There are cases where I need to return collections with more than one, separate entries in it.

Is there something that I am missing?
Thank you
Bruno

Not a bug, rather an undocumented feature.

Here are some alternatives that you can test:

(1) using the operator SET to eliminate duplicates:

SELECT sisc.seq_site_cours,
       set(
         cast(
           collect(individu_ot(indivmc.numero_dossier, indivmc.idul, indivmc.nom, indivmc.prenom))
           as individu_ntt
         )
       ) as distinct_list
FROM site_section_cours sisc
     INNER JOIN enseignant_section_mc ensemc
             ON sisc.code_session = ensemc.code_session
             AND sisc.numero_reference_section_cours = ensemc.numero_reference_section_cours
     INNER JOIN individu_mc indivmc
             ON ensemc.numero_dossier_pidm = indivmc.numero_dossier
GROUP BY sisc.seq_site_cours
;

(2) using the MULTISET with a subquery

SELECT sisc.seq_site_cours,
       CAST(
         MULTISET(
           SELECT distinct
                  indivmc.numero_dossier, indivmc.idul, indivmc.nom, indivmc.prenom
           FROM enseignant_section_mc ensemc
                INNER JOIN individu_mc indivmc
                        ON ensemc.numero_dossier_pidm = indivmc.numero_dossier
           WHERE sisc.code_session = ensemc.code_session
           AND sisc.numero_reference_section_cours = ensemc.numero_reference_section_cours
         )
         AS individu_ntt
       ) AS distinct_list
FROM site_section_cours sisc
;

Tags: Database

Similar Questions

  • How to get rid of "Web Page Message" indicating the object does not support this property or method.

    After I log on my computer, I get the following pop up message "Message on the Web Page" - "object does not support this property or method." He continues to pop everytime I try to do something

    Hello

    I suggest you to follow these steps and check if that helps:

    Method 1:
    Start the computer in safe mode and check if the same problem occurs:
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode

    Method 2:
    Try to perform the clean boot and check if it helps:
    http://support.Microsoft.com/kb/929135

    NOTE: When you are finished troubleshooting, make sure that you reset the computer in start mode normal such as suggested in step 7 of the above article.

    It will be useful.

  • Align the object does not support the text properly?

    When I vertically align a line of text and a rectangle, it is not well centered visually. I have "Use Preview Bounds" lit.

    This screenshot, the two blue squares are the same size. Illustrator obviously think it is mathematically focused., but it is not visually. What is Illustrator evaluating in the line of text that made this mistake of centering (there is no descenders)?

    Tips for fast fix visually centered text in a box?

    Screen Shot 2015-04-03 at 11.26.31 AM.png

    Navarro,

    You can:

    (1) tick Edit > preferences > General > use overview of limits;

    (2) select the Type and the effect > path > describe the object.

    Which will reduce the Bounding Box to the real limits of the letters and keep the editable Type.

    Don't forget to uncheck the Edit > Preferences > General > use limits Preview until you get a reverse problem.

  • The text of the e-mail under the column of the object does not match the selection

    When I get to my Inbox and select an e-mail to open the middle box and the text box below do not match the selection in the object column. This has occurred recently and only on my laptop. My office works fine. The central area and the text matching, this email has been deleted but the text won't just change and go. I'm going on a trip tomorrow, and if I can't fix this, I won't be able to open emails with possible solutions. I'll see answers but can't open them.

    right click on the folder, select Properties, and then on the button repair.

  • Sharing the features of the object does not not for flas version 7

    Hello
    I created a feature about the shared object. I do a login screen. When I submit information it stores data for the respective users.
    I have stores data only after you click the submit button. The main problem is that when I use flash version 7 in public environment when publishing and check the application using the standalone swf file it works. But it works well for the flash 6 version. But when I test it in the environment, it works very well for versions of flash programming. Please do the needful. Thanks in advance

    Quote:
    Posted by: chan_cabin
    Hello
    I created a feature about the shared object. I do a login screen. When I submit information it stores data for the respective users.
    I have stores data only after you click the submit button. The main problem is that when I use flash version 7 in public environment when publishing and check the application using the standalone swf file it works. But it works well for the flash 6 version. But when I test it in the environment, it works very well for versions of flash programming. Please do the needful. Thanks in advance

  • [CS4 |] JS] move anchored object does not change its geometricBounds

    Hello scripters.

    in my Indesign document I anchored objects like sidenotes, sometimes they are overlapping.

    To do this, I'm trying to move until they overlap, I used the following script:

    myInlineRectangles [k] .move (undefined, [0, -2]);

    I put this line in a while loop to move the object (until he do not overlap).

    It works, it moves the object (although I read that it is not possible). The only problem is that the geometricBounds remain the same.

    As I am comparing the geometricBounds in my "all-State" it ends in an infinite loop.

    Why the object does not change its geometricBounds after moving?

    How to avoid this?

    Thank you very much in advance for any response.

    Franzi_ska

    Hi franzi_ska,

    You will need the story containing the anchored object to recompose to get the new geometric limits (after each trip and assuming the anchored object can, indeed, move).

    Thank you

    OLE

  • Key on the keyboard does not work in firefox box when you type in the web site, but it works everywhere else?

    Key on the keyboard does not work in firefox box when you type in the web site, but it works everywhere else?

    Try Firefox SafeMode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    Can be caused by an add-on to the AVG.

    When find you what is causing that, please let us know. It might help others who have this problem.

  • Save for precedent: the "Attachment" object does not exist in the previous version

    I'm trying to save a very simple VI from LabVIEW 2013 SP1 to LabVIEW 2009 but I get this strange error.  The VI contains only basic ex that are available in all versions of LabVIEW (shift logical AND Select,<=, u8). ="" when="" i="" try="" to="" save="" it="" for="" labview="" 2009,="" it="" gives="" me="" the="" following="">

    Missing object.  The "Attachment" object does not exist in the previous version.

    I thought first of all it had to do with being possessed by a lvclass, but even after that I removed the class (and unplugged from the lvclass) it always gives me this warning.

    When I try to open it with 2009, it will fail to load the schema-block (error 6).

    The next thing I tried was to copy the block diagram for a new VI and re - create the connector pane, but that doesn't change anything.

    Any ideas?

    Maybe "attachment" made reference to an attached comment (the arrow of a free label for an object on the diagram). I don't expect the presence of attached comments to cause a SFPed VI to not open, but it's the only thing I can think of. Try to remove any comment attached to your diagram and SFPing and see if that solved the problem.

  • In the attached VI why looping force the type of data while the other does not?

    In the attached VI why looping force the type of data while the other does not?

    I'm guessing that you have created the Enum on the front panel.  If you right click and create an indicator, it corresponds to the type and be an enum.  LabVIEW represents enums as U16, but because the types are not the same (for example, your enum has 3 values, but a U16's 65 536 values), LabVIEW automatically converts value (or converts) the smallest representation (enum) in the largest value (U16).

  • Outlook 2002/Windows error message 7: can't open this item. The object is not valid.

    I recently bought a new computer (eMachine ET1831-05) with Windows 7 installed at the factory.  I installed Outlook 2002.  My old computer died & I have been unable to export my calendar, contacts, etc., so I'll have to enter everything manually in my new.

    When I save a calendar appointment is periodic (for example a birthday) I'm unable to open the appointment.  When I try, I get a message - cannot open this item.  The object is not valid. If I set an appointment that recurs not , everything works fine.

    Any suggestions?

    Thanks in advance!

    Windows Update has nothing to do with your questions.

    Please post here instead: http://social.answers.microsoft.com/Forums/en-US/outlookcontact/threads

    THX

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • In Outlook Express, when I type in the first letter of an e-mail address that is in my contacts, the dropdown does not close when I click the right address.

    Original title:

    Under XP, when I type in the first letter of an e-mail address that is in my contacts, the dropdown does not close when I click the right address. What a nuisance! Also, when I go to create a new e-mail message, an address of my contacts appears in no particular place, making it impossible to complete the message.

    Hello

    I suggest you turn off Auto complete and then check if you face the same problem.

    a. open Outlook Express.

    b. click on Tools.

    c. click on Options.

    d. click the send tab.

    e. uncheck the e-mail address automatically complete when composing box.

    f. click OK.

    Turn Auto complete and test again to see if the behavior is better. To activate it again, follow the same steps as above, but put a check mark in the box.

  • What can I do to remove a box pop up indicating "Message from Web page" and the message reads "object does not support this property or method".

    What can I do to remove a box pop up indicating "Message from Web page" and the message reads "object does not support this property or method".

    Hello

    1 how long have you been faced with this problem?

    2 have you made changes on the computer before this problem?

    3. when exactly you get this error message?

    The following threads may be useful:

    http://answers.Microsoft.com/en-us/IE/Forum/IE8-windows_other/message-from-webpage-not-implemented/d09fa331-92c6-4CD3-bc89-9a2c03e304fe

    http://answers.Microsoft.com/en-us/IE/Forum/IE8-windows_other/message-object-doesn

  • When I connect to the Internet, I get a message error "object does not support this property or method". Unable to do anything from there.

    original title: error messages
    As soon as I get on Explorer and on internet I get an error message "object does not support this property or method' am unable to navigate due to this message to appear on each movement.  Someone help?  Thank you

    Hello

    (1) do you have made no changes before this problem?
    (2) is this problem limited only with a particular website or any websites?

    (3) when exactly, you receive an error message when you use Internet Explorer or when the Internet connection?
     
     
    Method 1: If you receive script errors, you can read the following article and check if that helps.
     How to fix script errors in Internet Explorer on Windows computers?
    http://support.Microsoft.com/kb/308260

    Method 2: You can also read the following article and check if it helps.

    Can't access some Web sites in Internet Explorer
    http://support.Microsoft.com/kb/967897

    Warning: Please note that reset the settings of Internet Explorer running resets all of the settings defined by the user, including those established by the installed extensions, toolbars and other add-ons for IE by default. This includes all the security, privacy and settings area. Also this will erase browsing history, delete all temporary Internet files, cookies.

    Method 3: Networking in Mode safe
    Follow the link below and check if the problem persists in safe mode with network.
    http://Windows.Microsoft.com/en-us/Windows-Vista/advanced-startup-options-including-safe-mode

    Hope this information helps.

  • will never be an update where you can erase a background object of an image without clear photo behind the object and have the result as if the object was not always on the picture in the first place.

    Will never be an update where you can erase a background object of an image without clear photo behind the object and have the result as if the object was not always on the picture in the first place.

    I guess this feature without doubt not will be part of Lightroom because of the non-destructive nature publishing. Is that programs like Photoshop are for. But I don't speak for Adobe, because I do not work for them, and I did not all understand what are their plans for the future.

  • Object does not support the appliedparagraphStyle

    I use this notation on my script but I have this problem:

    in the first case (appliedCharacterStyle), my script works well;

    in the second case (appliedparagraphStyle) ID returns me an error:

    JavaScript 55 error

    Object does not support the appliedparagraphStyle

    Note that the grep finder back me the occorrence good, is just in the app.changeGrepPreferences.appliedparagraphStyle error.

    Can someone help me?

    ThnX a lot

    app.findGrepPreferences.findWhat = "<(.+?)". > ';

    var myFoundItems = app.activeDocument.findGrep ();

    var myCounter = myFoundItems.length - 1

    myTotal = myCounter + 1;

    Alert ("occorrenze" + myTotal);

    app.changeGrepPreferences.changeTo = "$1";

    app.changeGrepPreferences.appliedCharacterStyle = myDocument.characterStyles.item ("text");

    myDocument.changeGrep ();


    app.findGrepPreferences.findWhat = "£(.+?)". £";

    var myFoundItems = app.activeDocument.findGrep ();

    var myCounter = myFoundItems.length - 1

    myTotal = myCounter + 1;

    Alert ("occorrenze" + myTotal);

    app.changeGrepPreferences.changeTo = ' $1 ~ b ";

    app.changeGrepPreferences.appliedparagraphStyle = myDocument.paragraphStyles.item ("headR");

    myDocument.changeGrep ();

    JavaScript is case-sensitive, you must use appliedParagraphStyle with a capital P in the paragraph.

Maybe you are looking for

  • Satellite C660-13R - helps with the necessary drivers

    Hi all I hope someone can help or point me in the right direction please. Yesterday, I wiped my laptop and reinstalled windows on it. When she finished and the laptop started I noticed an icon in the Quick Launch bar saying there was no connection th

  • CVS1458RT, EtherCAT 9144, Softmotion

    Hello I just wanted to confirm. I want to use a 9263 analog output and a diff 9411 channel installed on a chassis of 9144 EtherCAT. I want then to use a CVS 1458RT and loop Softmotion RT to control those. (similar to the example: Interface for servom

  • runing an algorithm in FPGA in Veristand

    the app is like this: a model (dll) is imported to the Veristand, and this model will be run in the aim of RT. We have another algorithm, and we intend to deploy in the FPGA. the model running in the taget RT has an input and an output signal, the al

  • Cannot install updates since the June code 80070426

    I read most of the posts on this topic and followed many of the instructions.  I checked the software licenses, tried to repair vista from disk installation and most other things described so far.  the scannow said ago still corrupt won't fix this di

  • Cannot play WMV files in Media Player 11

    HelloI can't play WMV files in Media Player 11.  When I try, I just got the message: Windows Media Player has encountered a problem while playing the file. For any additional help, click Help on the Web. I tried to download updates but I get the mess