Create Comma seperated list of groups with the same number

Hi all

I have a table that has 2 columns and the data are as below

API_Number nom_du_groupe

1234 A group

3241, Group A

Group B 1234

4567, Group C

7896 Group D

3241, Group E

I wanted to find the API numbers repeating in different groups. In the output, I want

API_Number nom_du_groupe

1234 Group A, Group B

3241, Group A, Group E

4567, Group C

7896 Group D

Please help me with the query. I'm new to PL/SQL. Appreciate your help,

Thank you

It is a solution with hierarchical query (CONNECT BY):

T (API_Number, Group_Name) AS

(SELECT 1234, "Group A" dual UNION ALL)

SELECT 3241, "Group A" double UNION ALL

SELECT 1234, 'Group B' FROM dual UNION ALL

SELECT 4567, "Group C" dual UNION ALL

SELECT 7896, "group of FROM dual UNION ALL

SELECT 3241, 'Group E' OF THE double)

SELECT api_number, ltrim (sp, ',') gn

Of

(SELECT API_Number, sp SYS_CONNECT_BY_PATH (groupname, ','),

CONNECT_BY_ISLEAF he, row_number() OVER (PARTITION BY GroupName ORDER BY level DESC) rn

T

CONNECT NOCYCLE PRIOR API_Number = API_Number AND GroupName PRIOR<>

WHERE it = 1

AND rn = 1

ORDER BY API_Number;

API_NUMBER GN

1234 Group A, Group B

3241, Group A, Group E

4567, Group C

7896 Group D

Tags: Database

Similar Questions

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • Windows 8 store listing Multiple PCs with the same name - how to remove?

    Hi there... when I go to the store in Windows 8, in my account settings, I see four listed computers.  Two of them are named similarly (I reinstalled Windows 8 a few weeks after I had first and kept my the same PC name).

    I would like to remove one of the PC that has a duplicate name, but I don't know that one to remove.  Y at - it an easy way to see what is the PC I'm on right now, and what is the old PC?  I'm paranoid that to remove that incorrect it will cause my apps on this PC to stop working.

    Thank you!

    In fact, I just understand how do.  Here's what worked for me:

    • Rename your computer from the desktop.  Right click on my computer > properties > etc.
    • You will need to reboot for the change to take effect.
    • Now, go to the Windows store and download an application.  Any application.  It may be a free, or one that you have already purchased.  Is not serious.
    • Once the download is complete, you can return to your account in Store, and you'll see your list of computers is updated with your newly renamed computer.
    • You can now delete the duplicate computer registration.
    • Once it is removed, follow the steps above to rename your computer in its original name.

    It seems that you must actively download an app from the store in order to force it to update the list of the PCs in your bank account settings.

  • VRA unable to create groups of companies with the same name in different tenants with vRO

    vRA 6.2.2 Build - 2754020

    vRO 6.0.1

    Through the vRA GUI I can create groups of companies with the same names in different tenants as follows:

    Tenant1: BusGroup1, BusGroup2, BusGroup3

    Tenant2: BusGroup1, BusGroup2, BusGroup3


    However, to create business groups with the same names in different tenants via the vRO, specifically the workflow plugin Library / vCloud Automation Center / Administration / Business groups / create a group of companies, fails in the second tenant with the below error:


    [42106] the specified condition is not respected for 'name '. (Name of the dynamic Script Module: createBusinessGroup #12)

    If I change the naming convention to be different by tenant, then I have no problem. I thought it might be a restriction in the product, but as said I was able to create with the names of same origin through the user interface.

    Anyone experience the same thing?

    This is a known problem within IaaS API the plugin vRO uses to manage groups of companies through business groups workflows. You don't have the same problem of the vRA UI because the user interface (according to the 6.x) does not use the same API IaaS to manage groups of companies.

    The only alternative to 6.x for now is to directly use the helper generic entity Manager plug-in itself. You can take a look at the first example in example CRUD Infrastructure tasks management Scripts.

    I hope it helps.

    Sergio

  • Several groups of ports with the same VLanID

    Ask a question on peoples experience or knowledge, because we had a little chat here at work. If you have several groups with the same VLanID virtual port in the same cluster, does or that will cause a problem?

    Tom - we do that regularly.

    We have large quantities of VLAN - and often will be have 2 VMs hosted on the same Vlan environments for the purposes of the Dev - but when we move to production, we want to be able to isolate the dependent VMs to the configured network - with the same Vlan in use. . with a name different from the ways that we can quickly determine which is which.

    In addition

    I have hhave 1 vSwitch, with 2 natachasery (set up for tolerance of failure... not load balancing). . 2 groups of ports. . even vLan. . but I can get then Port Group1 to Teddy defauilt 1 and Port Group2, or Teddy bear 2 - which means I can isolate traffic e.. except in an emergency.

  • I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. How can I fix?

    I created a PDF form with several drop downs, all with the same drop-down values. When I select a value of 1 in the drop-down list fields, it breeds in all others - which I don't want. Can I fix?

    I am fairly new to this, but I think it has to do with the way you have drop them downs named. Copy you a then keep stick in each area? If so, that's the problem. You must rename each with a different number: Dropdown1, Dropdown2, etc. I think this might solve the problem.

  • How to create two different smart albums with photos with the same date?

    I created a smart album by using 'Date is' and ' keyword is EAA.»  (The photos have a keyword like "EAA" or "Flower".  Photos of keyword EAA & flower have the same date.)  When I use "Corresponding to all" are has no pictures in the album.  When I use "Match any" all the photos are in the album - EAA & flower.  I would like an album with only pictures of CEA for that date and another album with photos of flower with the same date.

    I get the same answer.  I can get the date and to a key word to work with 'all' selected, but not date and keywords.  So you will need two smart albums: one with date and ECA ('all' selected) and the other with date and flowers ('all' selected).

    Use the file menu option ➙ new Smart Album.

    Report the problem to Apple via https://www.apple.com/feedback/photos.html.

  • compare files with the same structure of channel / rename channel(-groups)

    Hello

    I have several groups ch with many channels in the file of each measure.

    Now, I need to display/compare Channels 2 or more files of measures in a chart. (channel 'speed1' to the file 'measurement1' vs 'speed1' to the file 'GCA2' channel)

    So I import 2 files in the browser und have the same structure of string twice. To distinguish between the channels of the two files I want to rename the channels by script and add the file name of the channel-group name.

    Is this a common way to compare measurement data in files with the same channel names and structures?

    In the affirmative. How can I make a script?

    Thank you very much in advance!

    Ski

    Hi Ski-Fahrer,

    each channel has a name of the institution.

    Data.Root.ChannelGroups ("Name" or Index). Channels (Index or "Name"). Name

    You can assign a new name like this:... Name = "NouvNom".

    I don't think it is necessary to rename the channels. If you do not forget the files. If you want to rename something I only rename the ChannelGroups by adding a date or a serial number.

    Kind regards

    Philipp K.

    AE | NOR-Germany

  • Problem in creating several attributes XML with the same name of the attribute

    I am trying without success trying to create several attributes XML with the same name, as shown here in a Microsoft example configuration file:



      
         
         
         
      

    I'm calling the NewDocument GetRootElement functions and then "newelement" (appSetting), "newelement" (add)

    Then I call AddAttribute with add, key & Key0, then with add, value & 0.  This seems to work fine but when I try to add the second pair of key & Key1 and value attributes & 1 for item "Add" replaces ""and I find myself with"" only.

    I do something wrong or CVI is not able to create an XML of this type?

    Thank you

    Here's how you do it. I show not to keep things simple error checking.

    #include

    public static void CreateAddElement (mother of CVIXMLElement, const char * key, const char * value)
    {
    Add the CVIXMLElement;
    CVIXMLNewElement (parent, -1, 'Add', &add);)
    CVIXMLAddAttribute (add, "touch", key);
    CVIXMLAddAttribute (add, "value", value);
    CVIXMLDiscardElement (add);
    }

    void main (void)
    {
    CVIXMLElement root, and appSetting;
    Doc CVIXMLDocument.
     
    CVIXMLNewDocument ("configuration", &doc);)
    CVIXMLGetRootElement(doc, &root);)
    CVIXMLNewElement (root,-1, "appSetting", and appSetting);
    CreateAddElement (appSetting, "Key0", "0");
    CreateAddElement (appSetting, "Key1", "1");
    CreateAddElement (appSetting, "Key2", "2");
    CVIXMLDiscardElement (appSetting);
    CVIXMLDiscardElement (root);
    CVIXMLSaveDocument (doc, 1, "c:\\temp\\temp.xml");
    CVIXMLDiscardDocument (doc);
    }

  • "Cannot select"[Gmail]"on the IMAP server. You could try refreshing your folder list to synchronize with the IMAP server. »

    Original title: "error message"

    I get this error message whenever I try to download my gmail account

    Header for the file download "[Gmail]" has not completed. Cannot select "[Gmail]" on the IMAP server. You could try refreshing your folder list to synchronize with the IMAP server. Account: 'imap.tools.sky.com', server: 'imap.tools.sky.com', Protocol: IMAP, server response: ' unknown mailbox: [Gmail] (failure)', Port: 993, secure (SSL): Yes, error number: 0x800CCCD2

    Please repost your question on the Forum of GMail at: http://www.google.com/support/forum/p/gmail/label?lid=745896f193361992&hl=en where the experts to GMail will be happy to help you.  You can also try technical assistance tohttp://mail.google.com/support/.  It is a GMail problem, not a problem of Vista.  If you use an e-mail program rather than online access, then it is possible that the e-mail program settings are incorrect. We do not know these settings but people to GMail.  That said, here's the IMAP settings for a number of e-mail programs (generic parameters - obviously not including your specific account):http://mail.google.com/support/bin/topic.py?hl=en&topic=12806.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • I want to install a second hard drive in my laptop (mSata SSD), so do I create a system dual boot with the same license Windows on each disc.

    Original title: Dual Boot Laptop

    I want to install a second hard drive in my laptop (mSata SSD), I have two programs to install that "do not receive the", so I can create a system dual boot with the same license Windows on each disc. I can run only one at a time, and it's the same pc/laptop.

    No, you can't, a second facility would be like installing on a second computer, you will need to purchase a second license.

  • Let me know scenarios when different virtual machines with the same UUID are created in VMware Hypervisors?

    Let me know scenarios when different virtual machines with the same UUID created in VMware Hypervisors, aside from editing the .vmx file?

    The only other way I've seen is when you manually copy the virtual machine to another location on the data store (or another data store) and then when turn on/off the virtual machine, select I moved, rather that I copied it (the default option).  This will keep the same UUID.

  • How can I register my copy of Lightroom 5.7 with the serial number that I bought? Information system currently lists the type of license as "creative cloud."

    How can I register my copy of Lightroom 5.7 with the serial number that I bought? Information system currently lists the type of license as "creative cloud."

    I downloaded 5.7.1, he asked for a serial number, and now everything is OK. Thanks for the help.

  • After hosting my site created with adobe muse on a ftp server, can I change my site on muse adobe later and update it on this same server ftp with the same domain name and do not have to pay for hosting again?

    After hosting my site created with adobe muse on a ftp server, can I change my site on muse adobe later and update it on this same server ftp with the same domain name and do not have to pay for hosting again?

    Yes, no extra accommodation payment is required. After editing your site and savings, click download file to the host of VTT... The info should auto fill with the same information that you used to download the site the first time. You can choose to download only files "changed" or "all files". Click OK and the old files will be overwritten.

  • Is it possible to create a database of the Clone with the same name of source db?

    Is it possible to create a database of the Clone with the same name of source db with RMAN...


    DB version is 11.2.0.2

    &

    Is it possible to clone a 11.2.0.2 database at 11.2.0.3 home location directly on a new server. If it starts in upgrade mode, it's ok...

    Hello;

    Here's what I have:

    Frequently asked Questions about the restoration or duplication between different Versions and platforms [ID 369644.1]

    This thread:

    Re: Duplicate RMAN

    Never done it myself, but I think that his

    alter database open reselog upgrade;
    

    I can predict all the details of this are understood to do a test on a system I can trash.

    Best regards

    mseberg

Maybe you are looking for

  • Satellite L300 refuses to boot after BIOS update

    Hello L300 my girlfriend was terribly dragged so we decided to format C:. We did it with the XP restore disc that came with it. Then we had to update the drivers. We started the installation of upgrading the BIOS on Toshiba driver site, disappeared f

  • How to save the 32L4333DG of Toshiba Software?

    How to save in the first version of the software for this model? After the TV to purchase all analog channels in which concerns the digital found in case of problems, but after software update, all channels disappeared. Who knows how this problem can

  • MSTSC.exe works intermittently on a PC, freezes on open almost every time

    Hello I have a client PC that freezes up to 2 seconds after you connect to an application without flaw on a server terminal server. The seamless application displays, but cannot be controlled. Therefore, the RDP session will not close properly and mu

  • Increase the size of the disc + oracle datafiles

    Hi allYou can the I need stop DB before increasing free space disk or point editing BONE?Not according to the versions of the OS?Under what conditions can I increase the size of the mount point while the database is runningThanks in advance

  • Faint line in the new composition - without diapers again?

    Hey guys, as you can see in this screenshot, a slight line appeared in my new compositions, even if there is absolutely no layers. The problem is that this operation exports on which the rest of what I do. What is this and how do I get rid of him? Ne