Output Required in this format

Hi,
with the below data
WITH t1 AS
     (SELECT 100 ID, 'Employee' emptype, 'Sun' NAME
        FROM DUAL
      UNION
      SELECT 100 ID, 'Employee' emptype, 'Gun'
        FROM DUAL
      UNION
      SELECT 100 ID, 'MANAGER' emptype, 'RUN'
        FROM DUAL
      UNION
      SELECT 100 ID, 'MANAGER' emptype, 'FUN'
        FROM DUAL)
SELECT   ID, emptype,LISTAGG(NAME,',') WITHIN GROUP (ORDER BY EMPTYPE) NAMES
FROM     t1
GROUP BY ID, emptypeso My output will be
ID EMPTYPE NAMES
100 MANAGER FUN,RUN
100 EMPLOYEE Gun,SunBut I want output as
100 EMPLOYEE:Gun,Sun||MANAGER:FUN,RUNCan any one please help me in proceeding further,
Many Thanks,

WITH t1 AS
     (SELECT 100 ID, 'Employee' emptype, 'Sun' NAME
        FROM DUAL
      UNION
      SELECT 100 ID, 'Employee' emptype, 'Gun'
        FROM DUAL
      UNION
      SELECT 100 ID, 'MANAGER' emptype, 'RUN'
        FROM DUAL
      UNION
      SELECT 100 ID, 'MANAGER' emptype, 'FUN'
        FROM DUAL)
select id, listagg(emptype||':'||names,'||') within group (order by id) names from
SELECT   ID, emptype,LISTAGG(NAME,',') WITHIN GROUP (ORDER BY EMPTYPE) NAMES
FROM     t1
GROUP BY ID, emptype
group by id
SQL> /
        ID NAMES
       100 Employee:Gun,Sun||MANAGER:FUN,RUN

Similar Messages

  • Output required in following format " Sold-to: Address: GRIMES, IA 50111"

    Hi
    Sold-to: Address: GRIMES, IA 50111
    need help how to join 3 field information in one row
    city, region and pin.
    i am using
    Perform add_to_extract Using label_sold_address2 it_data-ort01.
    I need to add the following fields to sold_address2 - " it_data-regio it_data-pstlz.
    FORM add_to_extract  USING    p_label
                                                    p_value.
      CLEAR it_extract.
      it_extract-label = p_label.
      it_extract-value = p_value. "
      APPEND it_extract.
      CLEAR it_extract.
    ENDFORM.          
    can someone suggest a way to add it.

    use
    data : v_address(40).
    concatenate 'Sold-to: Address:' it_data-city ',' it_data-regio it_data-pstlz into v_address.
    write v_address.
    Thanks
    Mahesh

  • Making an Output Required

    I want to make a sub VI output Required. This is apparently not an option. Am I missing something here?
    (VI attached. Notice that this can't work as a sub VI without wiring the output terminal because LabVIEW will crash.)
    Attachments:
    play short sound.vi ‏15 KB

    Phillip Brooks wrote:
    A couple of people have managed to create a VI with required outputs. The 'secret' han not yet been revealed, but you can monitor the discussion on the LAVA forums... I would like to know how too...
    (Even some NI folks would like to know how this was done, so it certainly sounds like a "suggestion page" candidate
    yea, i am still waiting on them to give it away. my patience is stretched i would love to have this feature.
    ... And here's where I keep assorted lengths of wires...

  • I am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    i am on windows 8 platform, i used adobe elements to work on my image - the output is in dng format, how do i convert this to jpg format?

    When you make a DNG that's like making another raw file, so you will need to convert the DNG file just like your original raw. Don't use the Save button in the raw converter. That's just a link to the DNG converter. Normally you would click Open instead and then save in the editor as a jpg or other image format of your choice.

  • Invalid END header format/no output available for this tool

    help me.
    I install oracle 9i into windows 2k server with pack3. when configuring the ODCA, when OUI prompt:
    invalid END header format&
    no output available for this tool.
    who can tell me that what is happen?
    before this, i had installed this version on windows 2003.

    Dear All
    I have the same problem when installing Oracle9iasR2 on a windows 2000 IBM server
    At the database configuration Assistant of the infrastructutre installation I am always getting this strange message Not a ZIP file (End Header Not found).
    We have tried a lot off scenarios to install Oracle9iasr2 but the installation always fails at the database creation with the followning message
    Not a ZIP file (End Header Not found).
    We had also tried to do the installation using a different copy of CD's with no success.
    Also the same installation on the same server was succesfull with O/S Win2003.
    Then the whole installation fails .
    If anyone has ever faced the same problem and had solved it please advice.
    Thank you in advance.
    Bill

  • Printing ABAP List(Report output - SE38) in A3 format

    I have a requirement to print the ABAP report in A3 page format. I am using LP01 printer and in in SPAD transcation I Changed the Tab "Output Attributes"
    Paper tray = "Paper tray 3" and Tab "Tray Info" Tray 3 = "DINA3"  still the report gets print in A4 page format.
    Even i tried by changing the lize size and line count...still .... it prints in A4 format only.
    Could you let me know what exactly I need to in order to print my report output in A3 Page format.
    Waiting for your reply.
    Thanks in Advance,
    Steevan

    Hi,
    Check this below link
    http://www.sap-img.com/basis/how-can-i-print-a3-format-in-sap.htm
    Cheers!!
    VEnk@

  • ALV Grid to be run in background & to generate output file in Excel format

    I use  REUSE_ALV_GRID_DISPLAY in my program for the ALV output
    My Requirement is Program to be run in a background since it is getting timed out when executed in foreground and also to generate the output file in Excel format. And we are using 4.6 C version.
    how do i attain this?

    Hello,
    One alternate solution can be :
    Execute your report in background and then send the data to Spool .
    From this spool , you can download the data in excel file.
              SUBMIT xyz TO SAP-SPOOL
                 SPOOL PARAMETERS gt_print_parameters.
    Regards,
    Sandeep

  • PDF output not retaining same formatting as done in RTF

    Hi All,
    I have created a RTF template and need to show the output in PDF. Now in the RTF, as per the requirements, I am not enclosing my form fields in any table or inside any tabular cells. So I have to display the output something like this
    Name : Peter
    Age : 30 years
    Address : New Jersy
    Dept : Accounts
    but after placing the form fields in their right places, when I see the output in PDF, the formatting is lost and values are NOT displayed at their desired places as set in the RTF template. So I get the PDF output something like this
    Name : Peter
    Age:
    30 years
    Address :
    New Jersy
    Dept :
    Accounts
    Is there a method to fix the form fields so that they don't move and i get the output in the same way as I have designed in the RTF template.
    Any help on this would be much appreciated.
    Thanks,
    Ronny

    Ronny,
    There is the concept of CONTEXT COMMANDS:
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187/T421739T481157.htm#con_freeform
    It may help to get what you want along with the example from the XML Publisher blog:
    http://blogs.oracle.com/xmlpublisher/entry/inline_grouping
    regards
    Jorge

  • Is it possible to see the Drill down output in the expanded format by default in SSRS reports?

    Hi Guys,
    I have created a drill down report. If i preview my report , by default i can see the out put in the aggregated level and i have to drill  it to down levels if i want. My requirement is i want to see the data in the leaf level by default means report
    should be displayed in the expanded format to the leaf level, if i want i can drill up the report later. 
    Is this possible in SSRS? Can some one help me out on this?
    Thanks in advance.
    Regards,
    kiran

    Hi ,
    Thanks for the reply. but if i follow this steps i can see the output in the expanded format but + and - symbols will be interchanged. That means if i drill up i have (-) before the column name and if i drill down it will be (+). 
    For this to work you need to set properties initial appearance of toggle image
    see this example
    http://www.mssqltips.com/sqlservertip/1329/drill-down-techniques-in-ssrs-with-the-visibility-property/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Converting spool output to MS Word format

    Is there any way to convert the SAP Script output to MS word format (like how we convert it into PDF) ?
    Regards,
    Dinu

    Hi,
      Try with fm CONVERT_TEXT, you may go thro' the following link,
    http://help.sap.com/saphelp_erp2004/helpdata/en/d6/0dba8f494511d182b70000e829fbfe/frameset.htm
    Hope this helps,
    Rgds,

  • Spool output in Excel sheet format

    Hi,
    We have background job , which creates a spool output in Internet Explorer format. Customer needs this in Excel format.
    Wondering, if any authorizations to be changed for file type? or this is a set in program level?
    Thanks,
    Sam

    Yes....Currently the customer email address is added to "Spool list Recipient" in SM37. This way, spool output is sent to customer through email. Currently it is in HTML format.
    Thanks,
    Sam

  • Need Spool output file in Excel format

    Hi,
    We have background job , which creates a spool output in Internet Explorer format. Customer needs this in Excel format.
    Wondering, if any authorizations to be changed for file type? or this is a set in program level?
    Thanks,
    Sam

    Hi Sam,
                     This need to be fixed at the program level only,so you need an ABAPer to make the changes in out put. There is nothing to do with authorizations.
    Regards,
    Hari.
    PS: Award points if helpful.

  • Output requirement not being hit

    We have an output requirement on an output type ZSOL but it is not hitting the requirement.  I know this because I even specify that sy-subrc = 4 in the requirement (no other code) and it still creates the output type.  This is on the delivery header.  What else could I check? Yes the requirement is active.
    Regards,
    Davis

    Hi Jelena,
    Thank you for your reply.
    Here you can see the details where the manual change flag can be seen (unticked).
    Regarding the Requirement checks, when I say all checks passed, I mean that every single value in the code is equal to the value it is checking against, for example:
    CHECK : KOMKBV3-UVALL CA ' C'. (value is initial = pass)
       CHECK : KOMKBV3-UVPRS CA ' C'. (value is initial = pass)
       CHECK : KOMKBV3-UVALS CA ' C'. (value is initial = pass)
       CHECK : KOMKBV3-RELIK EQ SPACE. (value is initial = pass)
       CHECK : KOMKBV3-RFBSK EQ 'C'. (value is 'C' = pass)
    Therefore, SY-SUBRC = 0 and the output is determined.
    The outcome is exactly the expected, the output is determined.
    The issue is in the analysis screen that shows the requirement as not fulfilled even though the output was successfully determined and I cannot see the access sequence used to determine the output.

  • Macbook Pro's Mini Toslink Output LPCM 2ch Audio format?

    Hi, I have a Sony Amplifier that accept optical input, but it only accept "LPCM 2ch audio format", so does Macbook Pro output this format?
    http://www.sony-europe.com/support/emanual/HAP-S1/HG/EN/contents/TP0000221964.ht ml
    Thanks!!

    Hi, I have a Sony Amplifier that accept optical input, but it only accept "LPCM 2ch audio format", so does Macbook Pro output this format?
    http://www.sony-europe.com/support/emanual/HAP-S1/HG/EN/contents/TP0000221964.ht ml
    Thanks!!

  • Outputting currency in external format???

    I am doing project for an external client. (China). I was outputting some currency values in report. I a mworking from india. Now i am getting warning that i should output currency in external format?? What does that mean???
    Rakesh

    Hi,
    The format currency depends on the user parameters.
    You can use the WRITE statament, and the system automatically will write the currency in according to the user parameters.
    You can try to use the statament SET COUNTRY <COUNTRY>, set all formats (date, currency) used in a country. In this way your program should be independent from user parameters.
    Regards,
    Satish

Maybe you are looking for