Club Multiple rows into single row

Hi,
Iam facing this problem. Iam having this table client_details with columns as
client -- group -- group_code
1234 ------ X ------ code1
1234 ------ Y ------ code2
5555 ------ X ------ code3
5555 ------ Y
Now when I Query this table for a particular client, I require both the group_code for this client (it can be null also). But I require the result in a SINGLE row.
The group will be either X or Y only.
Can anyone help me out pls
tnx
Che

oops
SQL> select client, max(decode("GROUP", 'X', GROUP_CODE)) X, max(decode("GROUP", 'Y', GROUP_CODE)) Y from client_details group by client;
CLIENT X Y
1234 code1 code2
5555 code3

Similar Messages

  • Scanning multiple pages into single document

    Is there a way to scan multiple pages into single document?  I am using the following: HP pavilion laptop with windows 8,  HP photosmart C6380 all in one printer scanner copier.

    Hi,
    Please try
    Double click printer icon on desktop,
    Select Scan a Document or Photo,
    Put the first page on the glass (face down),
    Check options (size, dpi ...), and select Scan document to file,
    Click Scan - machine will scan the first page
    Remove the first page on the glass, put the second page,
    Click + (plus sign) It sits on the left hand side of a red x
    Machine will scan the second page, put 3rd page on the glass and click + again ..... to the end then click Save
    Click Done after Save
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to Pass multiple parameter into single store procedure

    How to Pass multiple parameter into single store procedure
    like a one to many relationship.
    it is possible then reply me immediatly

    you mean like this .....
    CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
    BEGIN
    DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
    END display_me;
    CREATE OR REPLACE procedure display_me_2 as
    cnt integer :=0;
    BEGIN
    For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
         display_me(in_param => c1_rec.empno);
         cnt := cnt+1;
         end loop;
         DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
    END display_me_2;
    SQL > exec display_me_2
    Values is .....9999....Default
    Values is .....4567....Default
    Values is .....2345....Default
    Values is .....7369....Default
    Values is .....7499....Default
    Values is .....7521....Default
    Values is .....7566....Default
    Values is .....7654....Default
    Values is .....7698....Default
    Values is .....7782....Default
    Values is .....7788....Default
    Values is .....7839....Default
    Values is .....7844....Default
    Values is .....7876....Default
    Values is .....7900....Default
    Values is .....7902....Default
    Values is .....7934....Default
    Values is .....1234....Default
    Total record count is ....18

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • To Combine Multiple STOu2019s into Single Delivery

    Hi,
    What are the configuration settings to be done to combine multiple STOu2019s into one single delivery in VL10B. 
    My requirement is to combine multiple STOu2019s contains different DELIVERY DATES and having SAME SUPPLYING AND RECEIVING PLANT into one single delivery.
    Thanks & Regards,
    Victor.

    Hi
    Delivery in STO is created for single order and for same delivery date, same delivery no. for different delivery date and  for multiple STO is not possible and its not logically correct,since after creation of delivery you will be doing picking and packing and Goods Issue.
    Please check
    Kishor

  • Multiple deliveries into single invoice

    Gurus,
    My business requirement is like this,
    Order is created and delivery process is done with PGI,but the material moves with manual invoice/DC,but the end of the week,all deliveries are compiled into a single invoice  for particular customer.Wheares the header condition,business item remains same.When i tried to put all deliveries for the customer X in vf01 and execute,the individual deliveries cannot be convereted into into single invoice.When split analysis is done it says header is different,but to my knowledge all header ,business items are unique.Kindly help me at this ase

    - Try using Tcode VF04. Opt for delivery related billing active.
    - Select the desired delivery in Billing due list. (Press Ctrl Key from keyboard to select multiple lines).
    - Then you have 2 option
    1. To click on Collective Billing button to do a collective invoice for the selected delv doc.
    2. To analysis whether you will be able to a collective billing or not. To analysis that
    - click on simulation button.
    - Billing Doc Simulate: Billing Doc Overview Screen
    - Select all lines.
    - There first go for Logs, by pressing Log button.
    - Then click on Split Analysis button to get split analysis.
    - If you find any split reason and modify/adjust your copying control accordingly to do combine billing
    - Finally, click on Collective Billing button to do a collective invoice for the selected delv doc.
    Regards
    JP

  • Add Internal Table Multiple Lines into Single Line

    Hi Gurus,
    Before post this thread, i hav searched SDN but i could not find the exact solution.
    I hav an internal table, i want to add the records of this internal table into single line (string variable), separated by tab operator.
    can any one give me suggestions to solve this?
    Thanks
    Meher

    Hi,
    Program should be some thing like below:
    REPORT  ZTEST36.
    *-- test program to concatenate internal table to string.
    DATA:STRING TYPE STRING.
    TYPES:BEGIN OF TY_ITAB,
          WEEK(15),
          END OF TY_ITAB.
    DATA:GT_ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'SUNDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'MONDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'TUESDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'WEDNESDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'THURSDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'FRIDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'SATURDAY'.
    APPEND GT_ITAB.
    CLEAR:GT_ITAB, STRING.
    LOOP AT GT_ITAB.
      CONCATENATE STRING '/' GT_ITAB INTO STRING.
    ENDLOOP.
    WRITE: / STRING.
    Regards
    Ramesh.
    Moderator message - Ramesh - please use code tags
    Edited by: Rob Burbank on Jul 3, 2009 12:26 PM

  • Concatenate Multiple Columns into Single

    Hi All,
    I am developing a report and there is a field called FUNDING_SOURCE.
    This field is being picked from class_code of PA_PROJECT_CLASSES table as shown below:
    (select distinct(class_code)
    from pa_project_classes ppc,
    pa_projects_all ppa
    where class_category = 'FUNDING SOURCE'
    and ppc.project_id = :project_id)
    But, the requirement is to have all values of Funding Source for a particular project ID concatenated into a single column.
    Eg: If I run the above code, the output would be in 3 rows,
    Intenal
    External
    Other
    I want the output concatenated and displayed as Internal, External, Other.
    Please help me ASAP. Need to finish this soon.
    Thanks!

                        SELECT substr(MAX(sys_connect_by_path(a,
                                                              '~')),
                                      2) --first character wil be ~ max is used because the query will return 3 rows and u need only one row with all values appended
                          FROM (SELECT a,
                                       row_number() over(ORDER BY t.b) AS curr, --order in which appending happens
                                       row_number() over(ORDER BY t.b) - 1 AS prev --order in which appending happens
                                  FROM (SELECT 'Internal' a,
                                               1 b
                                          FROM dual
                                        UNION ALL
                                        SELECT 'External' a,
                                               2 b
                                          FROM dual
                                        UNION ALL
                                        SELECT 'Other' a,
                                               3 b
                                          FROM dual) t --creating dummy table
                        CONNECT BY prev = PRIOR curr
                         START WITH curr = 1;

  • Merge multiple columns into single column?

    Hi,
    I need to execute queries dynamically and return the values. I need to fetch the values of the queries in single column only by concatenating the multiple columns. I cannot use PL/SQL in my scenario.
    is there any way to execute a query and the result will be fetched in single column (values of multiple columns needs to be concatenated)?
    Thanks,
    Raja.

    hi,
    do you mean this??
      1* select EMPNO||' '||ENAME||' '||JOB||' '||MGR||' '||HIREDATE||' '||SAL||' '||COMM||' '||DEPTNO||
    SQL> /
    MULTIPLE_COL
    100 JDF DIR  05-SEP-09 200 1000 10
    7497 MILLER CLERK 7782 23-JAN-82 25000 195 35
    7566 JONES MANAGER 7839 02-APR-81 3175 446.25 20
    7654 RAR SALESMAN 7698 28-SEP-81 1450 1587.5 30
    7698 BLAKE MANAGER 7839 01-MAY-81 3050 427.5 30
    7782 CLARK MANAGER 7839 09-JUN-81 2650 367.5 10
    7788 SCOTT ANALYST 7566 09-DEC-82 3200 450 20
    7839 KING PRESIDENT  17-NOV-81 5200 8250 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1700 225 30
    7876 ADAMS CLERK 7788 12-JAN-83 1300 165 20
    7900 JAMES CLERK 7698 03-DEC-81 1150 85.5 30 [email protected]
    MULTIPLE_COL
    7902 FORD ANALYST 7566 03-DEC-81 3200 450 20
    8000 KINGBABA PRESIDENT  17-NOV-81 5200 8250 10
    8001 TURNER RAV SALESMAN 8000 08-SEP-81 1700 450 30
    1001 KITTU DOR  05-SEP-09 1200 100 40
    15 rows selected.Or
    Mean this??
    SQL> ed
    Wrote file afiedt.buf
      1  With T As
      2     ( Select Level col1 From dual Connect By Level<=10
      3     )
      4     Select Max(SYS_CONNECT_BY_PATH(COL1||',',' ')) Multi_col
      5       From
      6     ( Select COL1, Lag(COL1) Over (Order By COL1) As Lag
      7             From   T  )
      8      Start With Lag Is Null
      9        Connect By
    10*    Prior col1 = LAG
    SQL> /
    MULTI_COL
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10,Edited by: user291283 on Sep 8, 2009 10:10 PM

  • Error message when trying to merge multiple files into single PDF file

    Greetings! I'm on windows 7 professional, adobe 9 pro and a 64 bit PC. When I try to merge several PDF files from the same folder into a single PDF file I get this error message "You can choose multiple items only if they are all located in the same folder" - Please help! Thx.

    The product is Acrobat, not Adobe. That being said, I suspect you may only be running AA 9.0 and that may be the issue. If you have not done the updates to the 9.5.5, you probably should. That may fix the issue you are having, particularly since you mentioned a 64-bit system.

  • Multiple pdfs into single pdf

    Hi All,
    I have a report which output some records. Each selected record will produces a PDF as output.
    When am selecting multiple records other one .... am getting the PDF output one after the other
    instead of getiing in a single PDF.
    Could you please tell me how to proceed with this.
    The LOGIC am using in the program
    Am appending each PDF data using the FM CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    Into an internal table.
    Now,am passing this internal table to the FM GUI_DOWNLOAD
    and again passing this to the FM WS_EXECUTE.
    But the output which am getting is only one PDF(i.e it is overlapping the one pdf data witht he another one).
    Thank you.
    Regards,
    Padmasri.

    Hi,
    Follow these steps,
    get the otf of each output and then append it to the same internal table ( with otf entries of all the pages )
    Then at last convert this otf into PDF.
    To get the OTF format and converting it into PDF there are many threads available in SDN, please search it.

  • Multiple objects into single emitter-possible??

    Is it possible to have multiple objects turned into a single emitter to set different ranges, life, scales, etc.? Specifically, I have about two dozen text words I'd like to be able to turn into a single emitter as opposed to doing a separate one for each...thanks for any help!
    ~Chris

    New Discussions ReponsesThe new system for discussions asks that after you mark your question as Answered, you take the time to mark any posts that have aided you with the tag and the post that provided your answer with the tag. This not only gives points to the posters, but points anyone searching for answers to similar problems to the proper posts.
    If we use the forums properly they will work well...
    Patrick

  • Data Federator:  Unioning Multiple Tables into single view possible?

    Hi,
    I have three different databases with tables containing a portion of the same kind of data and I want to union the three different tables together in Data Federator to present a single logical view that has the complete set of data.  Is this possible in Data Federator?  How would I go about doing that?
    Note: I do not have keys to join the tables together on since it's not simply extending the data in one table with additional data in another table and doing an inner join on a unique key.  Instead, for example, there's a customer table for Finance, a customer table for Operations and a customer table for Sales and they all contain the same columns (with maybe slightly different names) and same type of data.  I want to effectively union Finance, Operations and Sales together in a federated/virtualized view so applications can just query from that view to get all the customers from the three different databases.
    I have been unable to do this so far since Data Federator requires each table in a mapping to have a relationship with the other tables in the mapping.
    Thanks for the help.
    Kerby

    I figured out the original question using one mapping for each table but have a new question now. 
    Is it possible for an application to use the combined view from Data Federator to write back into the databases?
    e.g. have an application use the target table in Data Federator and view the results, and based on that update the data in the underlying database that provides the data for the target table?
    Thanks for the help.
    Kerby

  • How to get the data from multiple tabes into single table

    hi all,
    here i am having 10 data base tables,how to get the data into a single table.
    regards,
    subba reddy

    hi,
    non XI/PI related
    Regards,
    Michal Krawczyk

  • Function Module to convert multiple records into single record and vice-ver

    hi,
    i have a requirement to convert 10 records in an internal table to single record which should be passed
    to a single variable and store in the database.Kindly let me know is there any function module
    which meets my requirement. Also i need to do split one single record to 10 records each of
    say 65 length interval.
    kindly provide me if there is nay functinon module as such.
    I can do with ABAP-OOPS.Please suggest function module.

    I dont think such FM exists, but if you wanna code one it would be simple. Just loop through the internal table, keep concatenating the currently processing record into a long character variable to convert 10 records into one record.

Maybe you are looking for

  • Download internal table value to local file from BSP

    Dear all I ve converted a word file to XML and doing some modifications with the help of ABAP program .After that am replacing some of the fields by passing values.after that i am getting the same file to the local system.All these i am able to do in

  • PDF file not showing correctly in Preview or other apps

    Hi, I've trying to find an answer to my question for some time now on the internet, but couldn't find it anywhere. When I open a pdf file from someone who created it using Windows diagrams that are supposed to be Matrices are not showing properly. Mo

  • XI Installation requires ABAP Engine???

    Hi, We have a big landscape in our organisation.We are planning to install XI (NW 2004s SR2) machine also. Our long term purpose with this installation is to replace the middlewares like Business connector,MQ etc. I want to know that at present,wheth

  • Webview app reject? What enhancements do I need?

    Hi there, I'm going to build an app for my boss, the owner of a restaurant. We recently got a new website with a mobile version and he wants that to be shown in an application. I already did that on android, but on iOS i read something about these ap

  • Labview IMAQ Vision

    Bonjour, Nous sommes étudiants en première année à Polytech' Clermont-Ferrand, université Blaise Pascal. Nous utilisons le module de traitement d'image du logiciel Labview depuis plusieurs mois avec M.Lafon afin de repérer les coordonnées en centimèt