Need help with the listagg function

Hi all

I try to use Listagg in the query below, but not able to get the answer. It is throwing an error message saying ORA-00979: not a GROUP BY expression.

If I try to remove the Group By function and run the query, I get the following error ORA-00937: not a function of simple-group.

Help, please.

Select Distinct V.User_X, V.Original_Request_Id, (V.Support_Group_Name, ',') listagg Group (order of V.Support_group_name) as Group1,

T.Individualassignedto, T.Status, T.Groupassignedto, T.Ticketcategory, T.Tickettype, T.orgcompany, T.submitter,

T.Orgassignedto, T.Urgency

Display V

INNER JOIN K_TICKET T ON T.TICKETNUMBER = V.ORIGINAL_REQUEST_ID

V.Original_Request_ID group

Because you use a GROUP BY, you don't need SEPARATE.

All the columns you are not aggregate (list) should be in the GROUP BY.

Tags: Database

Similar Questions

  • Need help with the analytic function

    I want to get the highest employee details and the 2nd highest employee for a particular service. But also the Department should have more than 1 employee.
    I tried the query and it gave me the correct results. But I wonder if there is another solution than to use the subquery.

    Here is the table and the query result:
    with t as
    (
    select 1 emp_id,3 mgr_id,'Rajesh' emp_name,3999 salary,677 bonus,'HR' dpt_nme from dual union
    select 2 ,3 ,'Gangz',4500,800,'Finance' from dual  union
    select 3 ,4 ,'Sid',8000,12000,'IT' from dual  union
    select 4 ,null,'Ram',5000,677,'HR' from dual  union
    select 5 ,4,'Shyam',6000,677,'IT' from dual union
    select 6 ,4 ,'Ravi',9000,12000,'IT' from dual   
    )
    select * from 
    (select emp_id, mgr_id, emp_name, dpt_nme, salary, row_number() over (partition by dpt_nme order by salary desc) rn from t where dpt_nme in 
    (select dpt_nme from t group by dpt_nme having count(*) > 1)) where rn < 3

    Hello

    You need a subquery, but you don't need more than that.
    Here's a way to eliminate the additional subquery:

    WITH     got_analytics     AS
    (
         SELECT  emp_id,     mgr_id,     emp_name, dpt_nme, salary
         ,     ROW_NUMBER () OVER ( PARTITION BY  dpt_nme
                                   ORDER BY          salary     DESC
                           )         AS rn
         ,     COUNT (*)     OVER ( PARTITION BY  dpt_nme
                                       )         AS dpt_cnt
         FROM     t
    )
    SELECT  emp_id,     mgr_id,     emp_name, dpt_nme, salary
    ,     rn
    FROM     got_analytics
    WHERE     rn     < 3
    AND     dpt_cnt     > 1
    ;
    

    Analytical functions are calculated after the clause WHERE is applied. Since we need to use the results of the analytical ROW_NUMBER function in a WHERE clause, which means that we have to calculate ROW_NUMBER in a subquery and use the results in the WHERE clause of the main query. We can call the COUNT function analytical in the same auxiliary request and use the results in the same WHERE clause of the main query.

    Would what results you if there is a link for the 2nd highest salary in some Department? For example, if you add this line to your sample data:

    select 7 ,3 ,'Sunil',8000,12000,'IT' from dual  union
    

    ? You can use RANK rather than ROW_NUMBER.

  • Need help with the analytical function select maximum and minimum of the results of the column

    Hey there OTN.

    I have an interesting application that I was hoping you would be able to help me with. I have a requirement to conditionally select the max and min of a column in bi-editor and since my editor works from an OBIEE analysis, I need store MAX and MIN of the column values in separate columns to match with. See the example below. You will notice that there are 4 stores including today's sales. I must have OBIEE through all the results of the column for sales, then choose the max of the dataset object. I can't use MAX here because he will choose the MAX of the line which will return only sales of this line. Instead, one must analyze all sales results and choose the appropriate column. Any idea on how to do this in OBIEE/publisher? Or is this not possible.

    Day Store Sales Sales of MAX Sales MIN
    05/11/15Store 1500080001000
    05/11/15Store 2750080001000
    05/11/15Store 3100080001000
    05/11/15Store 4800080001000

    I'm waiting for your answers. Thanks in advance!

    PS: I will always mark messages that are useful and eventually mark it as correct answer if we come to a resolution!

    See you soon.

    You can't do the same thing with RANK ("dirty")?

    Rank ("dirty") = 1: the max value in the result of sales

    RANK (-1 * "Sales") = 1: the min in the result of sales value

    I guess you can and then format the cells based on these values, where a value of 1 is the max or min according to the RANKING formula you used...

  • Need help with the INSTR function

    I try to use SUBSTR and INSTR function to parse a variable without breaking to the top of the variable. As you can see that the problem is space, negotiating
     
    DECLARE
         blank_space NUMBER(2);
         full_name VARCHAR2(30) := 'Robert P. Simmons');
         first_name VARCHAR2(30);
         last_name VARCHAR2(30);
         
    BEGIN 
         blank_space := INSTR(full_name, ' ');
         first_name := SUBSTR(full_name, 1, (blank_space -1));
         DBMS_OUTPUT.PUT_LINE( 'Your first name is ' || first_name);
         last_name := SUBSTR(full_name, (blank_space + 1),
         (LENGTH(full_name) - blank_space));                
         DBMS_OUTPUT.PUT_LINE( 'You have ' || 
         LENGTH(last_name) || ' characters in your last name!');
         
    END;     
    How can I enter the number of characters in name only? It lists just to the right of the 1st blank_space.

    Thank you
    SQL> declare
       blank_space   number (2);
       full_name     varchar2 (30) := 'Robert P. Simmons';
       first_name    varchar2 (30);
       last_name     varchar2 (30);
    begin
       blank_space := instr (full_name, ' ');
       first_name := substr (full_name, 1, (blank_space - 1));
       dbms_output.put_line ('Your first name is ' || first_name);
    
       dbms_output.put_line ('You have ' || length (substr (full_name, instr (full_name, ' ', -1) + 1)) || ' characters in your last name!');
    end;
    /
    Your first name is Robert
    You have 7 characters in your last name!
    PL/SQL procedure successfully completed.
    
  • Need help with the DECODE function

    Hello

    I try to use by default within the decode service and whenever I get a missing expression. I searched everywhere and can not know what I am doing wrong. Thank you

    Select decode (request_id, 0, "no file found", by DEFAULT)
    select decode (request_id,0,'No files found', request_id)...
    
  • Need help with the rtrim function

    Hi people,

    Honestly, I'm embarrassed to ask this, but I'm stumped

    Environment: 10 g Rel 2

    Entry:
    14:mm
    where mm can be no matter what integer between 0 and 9

    Desired output:
    I want to preserve the hours and to truncate the colons and minutes
    for example 14

    My attempt of the solution:

    Select rtrim('14:33',':')
    Double;

    Result: 14:33

    I would appreciate assistance from the Member

    rogers42

    Hello

    You can do this in several ways.

    1. If the 14:mm is a varchar2

    select substr('14:10',1,instr('14:10',':')-1) from dual
    

    2. If the 14:mm is a varchar2

    select to_char(to_date('14:10','HH24:MI'),'HH24') from dual
    

    Arun-

  • I need help with the control of two .swf in third.

    Hi, thanks for reading!

    I need help with the control of two .swf in third.

    I have a problem when I need to use a .swf in a digital signage solution, but were advised by the Legal Department, it cannot be changed in any way, I can not also have the source file blah blah blah. I pulled the .swfs on their site and I decompiled to see what I was up against.

    The main SWF that I need control is HCIC.swf and the problem is that it starts with a preloader, which, after the loading stops on a framework that requires user input to (button) on a play button, until the film will proceed and replay.

    What I've done so far is to create a SWF container, HCIC_container.swf, which will serve as a target for the HCIC.swf and I would like to send actionscript in the file, I am not allowed to edit.

    I managed to get done with help from someone on another forum. It is my hope that the following script just start HCIC.swf a framework after the preloader and button play and just play through.

    var container: MovieClip = createEmptyMovieClip ("container", getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener (this);
    mcLoader.loadClip ("MCIC.swf", container);

    function onLoadInit(mc:MovieClip) {}
    mc.gotoAndPlay (14);
    }

    But unfortunately it does not solve my problem. Because there is a media - controller.swf, which is charged by HCIC.swf who has orders, including the play button to start HCIC.swf.

    Here is a link to a .zip with all 3 files .swf file and all 3 .fla files.

    http://www.axiscc.com/temp/HCIC.zip

    What I have to do is to automatically start the HCIC.swf file, bypassing the pre-loader and play button without having to edit it or in the media - controller.swf in any case. Thus, all scripts must be done in HCIC_container.swf.

    I know it is confusing and it is difficult to explain, but if you look at the files it must make sense.

    ActionScripting is far from my point hard, so I'm definitely over my head here.

    Thanks for your help.

    Got my solution on another forum.

    http://www.ActionScript.org/forums/showthread.php3?t=146827

  • Need help with the installation of an adapter of Palit GeForce 9500GT Super chart - 512 MB in a M2N68 (narrated

    Need help with the installation of an adapter of graphics Super Palit GeForce 9500GT - 512 MB - DDR2 SDRAM in a M2N68 motherboard (narra6). Should I disable the onboard graphics in the bios? When the card is installed, no VGA work outs and the PC does not start. Checked and recontroler implementation of the card in the PCI slot. PC is a desktop HP G5200uk PC. Windows 7 operating system.

    Hello

    The link below is a guige to install a video card in your Pc.  In particular, it seems that you will have to perhaps specify the location of the new card in the bios and save this change before you install the new card - see step 4 in the guide on the link below.  If your new card fits into the PCI Express x 16 slot, you will need to define PCI Express in the bios and save the changes.

    http://support.HP.com/us-en/document/c01700855

    Kind regards

    DP - K

  • I need help with the program of Photos on my macbook pro

    I use a Macbook Pro with OS of Yosemite. I really need help with the Photo program. I never really got the hang of IPhoto and now that it's a new program, I'm really confused. Where can I go to learn this without waiting for the next workshop in a local store?

    Hi, I'm fighting to open same mine, making a new software update

  • Need help with the launching track pack for forza code 4

    Bought new Forza 4 and the lancer Track Pack code does not work, how do I get a code that is generated in the form I've already paid for it. Rank of loads of numbers and sent 10 s of emails but cant seem to get help.

    This is the help I get when the cat to an Ambassador xbox on xbox.com

    Terry wrote:
    Need help with the launching track pack for forza code 4
    The Xbox Ambassador says:
    Location of Ambassador of the community...
    The Xbox Ambassador says:
    Location of Ambassador of the community...
    The Xbox Ambassador says:
    Your question will be answered by an Ambassador of the Xbox. You have been connected to the Ambassador as a user Xbox [3]
    The Xbox Ambassador says:
    Hello
    Terry wrote:
    Hello
    The Xbox Ambassador says:
    Hey
    Terry wrote:
    just to be on the phone to xbox live support and was told to come here
    The Xbox Ambassador says:
    ok\
    The Xbox Ambassador says:
    What is your problem?
    Terry wrote:
    I bought the 4 for forza ansd 360 new sealed Christmas...
    Terry wrote:
    has got 2 codes that accompanies the game but the pack track code does not work
    The Xbox Ambassador says:
    Wow good
    Terry wrote:
    whenever I put in the code it says code redeemed
    The Xbox Ambassador says:
    I think the code is used. You must return to the retailer
    Terry wrote:
    I tried to, but since I already opened the case they will not accept
    The Xbox Ambassador says:
    Oh. No,
    Terry wrote:
    the code had been used or defective as I am the only person who has touched the game once opened, tried to enter the code when it is open
    The Xbox Ambassador says:
    Maybe it was auto bought?
    Terry wrote:
    so, how do I get another code generated track Pack if defective?
    The Xbox Ambassador says:
    I do not know.
    Terry wrote:
    bought the game new, so I get the track pack
    The Xbox Ambassador says:
    Oh. It's bad.
    The Xbox Ambassador says:
    I think that if you Exchange 1 code it will buy it
    Terry wrote:
    car pack code worked, starter pack did not work
    The Xbox Ambassador says:
    Oh.
    The Xbox Ambassador says:
    It's a bad
    The Xbox Ambassador says:
    BTW you have an evolution of the tests?
    Terry wrote:
    Yes, I want to? but more anxious to get a code object generated for this pack
    The Xbox Ambassador says:
    Hey if I help can u give me this game too?
    Terry wrote:
    ?????????????????
    Terry wrote:
    So is it possible to get a code for that time?
    The Xbox Ambassador says:
    Hey
    The Xbox Ambassador says:
    Yes.
    The Xbox Ambassador says:
    you need to contact them
    The Xbox Ambassador says:
    and tell them that the code is used.
    Terry wrote:
    I was told to come here? where can I go to get the code?

    Hi Terryg76,

    ·         What version of the operating system is installed on the computer?

    I suggest you to contact the game manufacturer for more help and information.

  • Need help with the blue screen issue "NAVEXI5. SYS, PAGE_FAULT_IN_NONPAGED_AREA ".

    Original title: need help with the blue screen issue
    My computer turns saying a blue screen: a problem has been detected and windows were shut down to prevent damage. The problem seems to be caused by the following file: NAVEXI5. SYS PAGE_FAULT_IN_NONPAGED_AREA he seems to have a different error whenever he turns to a blue screen. Can someone help me please.

    Hello

    1. Since when are you facing this problem?
    2. you remember to make changes to the system?
    3. do you get an error with this error code?

    I suggest to unplug external devices such as printer, scanner, etc. that are plugged into the system, and then restart the system and check if the problem persists.

    Method 1.
    I suggest you to do a check disk from the recovery console and check if the problem is resolved. Follow the steps mentioned below.
    a. start into the recovery console using the XP CD. Follow the steps mentioned in the article below.
    Description of the Windows XP Recovery Console for advanced users
    http://support.Microsoft.com/kb/314058
    b. perform a disk check.
    How to perform disk error checking in Windows XP
    http://support.Microsoft.com/kb/315265

    Method 2.
    I suggest you to start with the XP CD and then do a system restore. Follow the steps mentioned in the article below.
    How do I recover from a corrupted registry that prevents Windows XP startup
    http://support.Microsoft.com/kb/307545

    I hope this helps.

  • Need help with the IP configuration on vm ware for the installation of 11 GR 2 on linux vmware 6 on win7

    Need help with the ip configuration on/etc/hosts for the installation of 11 GR 2 on linux vmware 6 on win7.

    Let me know if you need more info... in fact I have a setting error while installation said

    -(/ etc/hosts has no correct entry for the host name)

    Host: 192.168.85.100

    Win7 ip: 192.168.1.x

    Thank you...

    (host computer)

    Win7 64 bit

    (vmware)

    Oracle Linux Server 6.3 version

    Release of Red Hat Enterprise Linux Server 6.3 (Santiago)

    Oracle Linux Server 6.3 version

    -(/ etc/hosts has no correct entry for the host name)

    Then post your/etc/hosts.

    Host: 192.168.85.100

    Win7 ip: 192.168.1.x

    Why 85? have you tried 192.168.1.100?

  • I'm on Acrobat 10 and I need help with the distribution of shape feature. Is there a way to change the registration e-mail download addressed to the? Currently all forms I create and then distribute may only be subjected to my email account... I appreciat

    I'm on Acrobat 10 for mac and I need help with the distribution of shape feature. Is there a way to change the registration e-mail download addressed to the? Currently all forms I create and then distribute may only be subjected to my email account... I appreciate any help!

    Do not use the feature distribute the form. Instead of this, just put up a button "submit" and configure it to send email using any email address you want. Just add a button and set the action of the mouse upward on "Submit a form" and use a type mailto URL and specify that you want to send the full PDF. Then activate the reader of the document: where "Advanced/extended features in Adobe Reader" is located in Acrobat XI?

    If you really want to use distribute the form for some reason, change the e-mail address in your preferences: Edit > Preferences > identity > Email address

  • Hello need help with the opacity mask.

    Hello need help with the opacity mask. I hope someone out there can help

    I inherited a logo that appears to use a Logo of OM has a shape with a grad. This grad at first sight is not used in the Grad scheme and there is not editable.  Looking at the transparency palette I find an OM (pic1) output option. If I choose what the grad on separates it from the page of the form, that is from there I can change/remove as required (Note2).

    However, sometimes (he did no change), I'll be back to the same original form and output option is grayed out and is no longer available. Or I go to the similar shape that has the same treatment and I can't go out OM (pic3)

    The only difference is the thumbnail in the transparency palette, which is strong in pic1 and rated on pic3. What Miss me?    I'm not clear what the advantage is simply OM using the Grad palette to apply a grad in my form, but until I can get rid of OM who is there, I can't comfortably apply to the grad I want.

    The white gradient LHS I have no problem with. I choose fortunately only and each time get the possibility of release of OM.

    Screen Shot 2015-08-06 at 12.26.48.pngScreen Shot 2015-08-06 at 12.00.10.pngScreen Shot 2015-08-06 at 12.01.16.png

    The other thing weird. When I select the white gradient. Sometimes, the exit option is in the palette without going through the drop-down list (Fig 4).

    Other times seems not that OM has already been applied, because the palette gives me the ability to mask rather than liberation (5 photos). Until I go to the drop down and then I find Release is an option after all.

    What is the difference here?   Not much of a problem, because either way I can release OM to be able to change the grad.

    The file is passed through several hands and play anywhere to try to resolve issues, and many stops and save slot, so something along the line was of course done a logo and not the other because of the difference, but I can't for the life of me see what that.

    Screen Shot 2015-08-06 at 12.44.21.pngScreen Shot 2015-08-06 at 12.44.36.png

    I hope someone can help. Very appreciated


    See you soon

    Dave

    Dave,

    I've (mis) understanding the issues, you can account for the box to the right in the main palette transparency (called thumbnail) here.

    Illustrator help | Transparency and blending modes

    represents the masking objects.

    Some of your screenshots show no object mask, so it only is not really a mask even if do the opacity mask has been clicked and there seems to be one in the layers palette, wherever you look.

    I think that it is perhaps the issue.

  • need help with the mac version of PES

    need help with the mac version of PES

    If you follow the 7 steps you can dl a trial via the links here: http://prodesigntools.com/tag/ddl

    and activate it with your serial number.

    If you have a problem dl'g, you don't follow all 7 steps.  the most common mistake is not meticulously follow the steps 1, 2, and/or 3 (which adds a cookie to your system, allowing you to download the correct version of the adobe.com site).

    p.s. If you need a more direct link, you must specify the exact version you want.

Maybe you are looking for

  • Set the status of the project window - minimize maximize

    Hello Does anyone have an idea how to set the status of the project (and also diagrams vi) window using scripts.  I want to be able to ensure that this window is one to a decent size at any time - as otherwise labview tends to block everything behind

  • What is the Max Ram can be installed in an HP Pavilion ZV5000?

    What is the maximum amount of ram I can install it in a hp Pavilion zv5000.

  • Changing recovery kit

    My hard drive has been formatted completely. I can restore the recovery partition by using disk recovery kit and how to do it correctly?

  • Runes of Magic will not play after upgrade to Windows 7 64-bit

    Have upgraded to window7 64 bit that I use now the 8 GB of ram Runes of Magic was playing on my old windows version but usually install a new Get message that windows could not find a version of the game, so I downloaded the patches for the game manu

  • APEX_MAIL. SEND and HTMLDB_MAIL. Send.

    Hello world!While working on a project of Summit, I noticed that two methods for sending e-mail exists in the project, an APEX_MAIL. SEND that was created by someone else and HTMLDB_MAIL. SEND to which I copied from a website. They both seem to work