Reporting out multiple lookup rows for one fact row. NON-Aggregating

Hi,
I have a situation where I have multiple Look Up rows for one fact row. I want to report them out so that I get One row with the Look Up and Fact information in it and the next row with Just the Look Up information in it.
The version of Oracle I'm using is 9.2.0.6.0.
Look Up Table
Deal Order Number     Partial Order ID     INVENTORY_ITEM_ID     MANUFACTURER_DESCRIPTION
639416-1                1                     43601                     Check Point
639416-1                1                     98809                      Nokia
637260-1                 1                     56657                   IBM
637260-1                 1                     35467                   QuantumFact Table
Deal Order Number     Partial Order ID     Cost
639416-1                 1                     3825.3
637260-1                  1                   3610.8Desired result:
Deal Order Number     Partial Order ID     MANUFACTURER_DESCRIPTION     Cost
639416-1                    1                        Check Point            3825.3
639416-1                     1                         Nokia
637260-1                     1                         Ibm                   3610.8
637260-1                     1                         QuantumBasically I'd like the ability to report out every row of my report with the first row containing the Fact Data and then the following rows containing the Look Up data that are also associated with that fact column but not report the data.
I'm doing this because there's Grand totaling at the bottom of the report that I don't want to mess with.
Plus instead of concatenating the Look Up values together, I need to show them in their own cells in their own rows for view ability.
I think an Analytic function might take care of this but I'm not sure how. Can anyone help?
Thanks in Advance!

Hi,
Join the two tables as you normally would.
You're right about analytic functions being useful. The anaylytic ROW_NUMBER function can number each row of the join, with a separate count for each unique id from lookup.
Use a CASE statement to display certain items from fact when ROW_NUMBER retuns 1, and hide them otherwise.
SELECT     f.order_number
,     f.partial_order_number
,     l.manufacturer_description
,     CASE
          WHEN     ROW_NUMBER () OVER
                    ( PARTITION BY     f.order_number
                      ,          f.partial_order_number
                      ORDER BY     l.manufacturer_description
                    ) = 1
          THEN     cost
     END     AS cost_col
FROM     fact     f
JOIN     lookup     l     ON     f.order_number          = l.order_number
               AND     f.partial_order_number     = l.partial_order_number
ORDER BY     f.order_number
,          f.partial_order_number
,          l.manufacturer_description
;

Similar Messages

  • Multiple db connections for one report

    Hi all,
    I am using Oracle Reports 10g R2. Could someone tell me if Oracle Reports supports multiple database connections for one rdf file, like this (using servlet)
    http://your_web_server:port_num/reports/rwservlet?server=server_name&report=myreport.rdf& userid1=username/password@my_db1&userid2=username/password@my_db2 &desformat=pdf&destype=cache
    I am asking this question because my report needs data from two separate Oracle databases.
    Edited by: user12239004 on Apr 27, 2010 2:14 AM

    No, you can only have one login.
    However, this is simple to resolve by creating a database link in one database to the other database.

  • HT5002 I used Inkscape on Linux before moved to Mac. Now I am trying to install it using MacPorts, but libpixman has some problems that has been reported out there. Does any one know how to fix it without the need to use other way than MacPorts?

    I used Inkscape on Linux before moved to Mac. Now I am trying to install it
    using MacPorts, but libpixman has some problems that has been reported out there.
    Does any one know how to fix it without the need to use other way than MacPorts?

    Start with this comprehensive troubleshooting article:
    https://discussions.apple.com/docs/DOC-3521
    Look at this one for possible solutions:
    https://discussions.apple.com/docs/DOC-3353
    Ciao.

  • Multiple free goods for one item in standalone CRM

    Hi Gurus,
    We are trying to implement multiple free goods for one item in standalone CRM.
    As per SAP.help.com, it says that we can configure multiple free goods scenario in standalone CRM system.
    We tried to set up this in our system.  Basically we want to implement the scenario, where a user wants to  purchase item A, he should get a prompt for choosing between two free goods  B and C.
    We did the relevant IMG settings required for Free goods at  IMG ->CRM -> Basic Functions -> Free Goods.-> Set up Free Goods
    We also did the relevant item category determination where we have made an entry with
    Item Usage = " Free Goods" , Main item cat. = "TAN' , Item Category = "TANN".
    Now we went to create condition records in the path  "SAP Menu -> Master Data -> Prices and Conditions -> SAPCND/GCM - Maintain condition"
    We chose Application ="PRT", MaintenanceGrp="PRT_FGOODS", Maintenance context ="GCM"
    Then while creating conditon records , when I try to create two condition records where the Main Product is same but free good product is different, the system is not allowing to save these two condition records.
    it is giving error "Overlapping validity periods for two condition records".
    Please advice, if i am missing something. Thanks in advance for your help.
    thanks,
    Randhir
    Edited by: Randhir Soni on Feb 8, 2010 8:12 AM

    Constraints in free goods in R3 taken from SAP library
    Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
    Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    Free goods are only supported for sales orders with document category C (for example, not quotations).
    Free goods are not supported for deliveries without reference to a sales order.
    Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    This answers your qn Not possible in R3
    If you are on Retail scenario this is possible thro bonus buy schemes
    But a lot of customizations needs to be done and you need a retail server to do that
    Regards
    Raja

  • Multiple free goods for one main material

    Hello SAP Gurus,
    we have a business requirement that to issue multiple free products for one main product, if the upliftment is beyond the specified quantity.
    Using free goods functionality, is it possible to achive the above requirement.
    e.g                                                     Quantity
    main product        123456                         10
    free goods             xxxxx                           2
    free goods             yyyyy                           1
    is it possible to maintain such data thru free goods or any development needs to be done.
    regards
    Casimer

    Constraints in free goods in R3 taken from SAP library
    Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
    Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    Free goods are only supported for sales orders with document category C (for example, not quotations).
    Free goods are not supported for deliveries without reference to a sales order.
    Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    This answers your qn Not possible in R3
    If you are on Retail scenario this is possible thro bonus buy schemes
    But a lot of customizations needs to be done and you need a retail server to do that
    Regards
    Raja

  • Creation of multiple cost center for one emplyee

    HI All,
    I have requirement . one emplyee is working two projects so need create two cost centers for one employee.
    please tell me how create multiple cost center for one employee.
    Thanks&Regards
    ramesh

    hai.
    if he works half the time... u can give 50%.. or just get it confirmed from core team member..
    manu

  • Show or view multiple album art for one song on iPhone 4?

    Is it possible to show or view multiple album artwork for one song on an iPhone 4, especially on the now playing screen? I figured since iTunes has this feature then the iPhone should too. Can I download an app that does this? I've searched but couldn't find any, maybe I'm using other keywords. Could anyone point me in the right direction with this?

    Darn. I hope an app is designed to be able to do this soon. From what I've seen this feature isn't really in demand so it could take a while. Thanks for replying.

  • Multiple Lease Duration for one DHCP Scope?

    Hi All,
    I have an urgent question. I wanted to know if it is possible to have many lease durations for different computer groups getting their addresses from one DHCP scope. I saw somewhere that it is possible to use User Classs or Vendor Classes for setting a lease
    duration for a group of computers sharing the same class Id ?
    If it is true, How can to configure ?
    Also i would like to know about the lease duration period what is the maximum days can we have ( 8 days After )?
    Thanks
    Atul

    Please refer to the following-
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/26de79f9-6ad7-4088-9077-006b9dd8c1fb/multiple-lease-durations-for-one-dhcp-scope?forum=winserveripamdhcpdns
    You can configure any value as lease duration; however if you want a very big/infinite value; it makes sense to convert the lease(s) to a reservation.

  • Multiple component instances for one component usage

    Hi,all
    How can I create multiple component instances for one component usage.
    I'm using the following code for creating  a single component instance for specific component usage:
    if(c_Usage.hasActiveComponent())
          c_Usage.deleteComponent();
    if(wdContext.currentContextElement().getSelectedTab().equalsIgnoreCase("Registered"))
          c_Usage.createComponent("health.gov.registered.Registered";);
    I can't create one more component instance for
    IWDComponentUsage c_Usage
    cause I have to delete the component instance associated with this component usage.
    Any idea how can I do it anyway?
    Regards,
    Michael

    Hi,
    To create another instance of the same component you need to embed the same component under the Used Components more then once. For Example if you have Componet A to which you want to embed Component B then under "Used Components" of Component A add component B twice.

  • Multiple output files for one report

    I would like to dump out multiple files (PDF and delimited) from one single report refresh.
    I'm using rwcli60. How do I do this ?

    Hi
    Thanks for the information. Its nice to know.
    However, if I understand it correctly, it is basically for directing the same report output to different targets.
    For me, it may be the same report, but the output will be different based on some logic I have in the before report trigger. For me it is like running the report 3 times.
    Example - From parameter screen - one parameter with 4 options
    1. Top 10 students in IT
    2. Top 10 students in Fin
    3. Top 10 students in Acc
    4. All
    The output of these report may come from the same table. But the criteria is set in the lexical parameter in the before report trigger.
    If user selects all, I want the output for the all the first 3 options. I am not worried about the output being emailed. This is equivalent to running the report 3 times for the first, second & third option respectively.
    Any help helps:).

  • Need a report column to hold data for one row only

    Hey Guys,
    I have a report which has a column that links to another page in my APEX application.
    There is a requirement where only one of the rows in this report needs to have a link so I need the column to show the page link for one row and one row only.
    The report will have about 5 rows at a time so is there a way to just make this link appear for the one row(it will be the top row) in the column attirbute in APEX? or can this be done in the SQL for the report?
    Any help is much appreciated
    Thanks
    -Mark

    Hi
    The only way (I believe) to do this is within the SQL. Then you just wrap the column in a CASE statement and if it meets your criteria then build up the link and if not then display normally.
    Something like this...
    SELECT ename,
           CASE WHEN empno = 7839
           THEN '<a href="f?p='||:APP_ID||':4:'||:APP_SESSION||'::NO::P4_TARGET_ITEM:'||empno||'" >'||empno||'</a>'
           ELSE TO_CHAR(empno)
           END empno
    FROM empCheers
    Ben

  • Multiple (mail) destinations for one report using distribution list

    I would like to email a report to multiple destinations using a distribution list.
    Environment:
    Oracle reports: 10.1.2.3
    OS: Windows 7
    Database:Oracle 11g(11.2.0.2)
    This is the content of the distribution file:
    <destinations>
      <foreach>
        <mail id="a1" from="[email protected]" to="&amp;&lt;mail_to&gt;" subject="Invoice">
          <body srcType="text" format="ascii">Invoice attached
          </body>
          <attach srcType="report" name="invoice.pdf" format="pdf" instance="this">
             <include src="report"/>
          </attach>
        </mail>
        <mail id="a2" from="[email protected]" to="[email protected]" subject="Invoice sent to &amp;&lt;mail_to&gt; ">
          <body srcType="text" format="ascii">Attached invoice was sent to the customer
          </body>
          <attach srcType="report" name="invoice.pdf" format="pdf" instance="this">
             <include src="report"/>
          </attach>
        </mail>
      </foreach>
    </destinations>
    When I run this using the following URL:
    http://testserver.our_servers.local:7778/reports/rwservlet?server=rep_dev&report=VKR0030.rdf&userid=myuser/test123@ORCL&distribute=yes&destination=VKR0030.xml&onfailure=rollback&onsuccess=commit
    I get the following error: REP-34304: Distribution failed to complete, please review the distribution lists
    When I remove one mail element, it works fine.
    One mail tag with multiple email addresses in the "to" parameter isn't possible because I have to use 2 different mail templates(subject and body differ).
    According to the documentation(https://docs.oracle.com/html/B14048_02/pbr_dist.htm#i1005830), it should be possible to use multiple mail elements.
    Required/Optional
    Optional. You can have as many mail elements as you require.
    What am I doing wrong?

    Found the solution.
    When putting each mail element in a foreach, it works.

  • How to find multiple transport requests for one object

    Hi all,
    Is there any function module which will fetches multiple transport requests ( if created ) for one object.I tried almost all the function modules , but i didn't got the solution.
    I need to develop a report ,   which will takes a single Task number as input and gets the Request number from table E070.
    Based on that Request Number i will fetch remaining Task numbers under it.
    Then for all the Tasks Numbers, i am fetching their  objects by using table E071.
    I need to list out  whether any of these objects are in multiple Transport Requests. Once i got all the Transport Request numbers i need to release the Request based on their Transport Request sequence.
    I tried the following FM's , but not able to get the solution.
    SVRS_DISPLAY_VERSION_LIST
    SVRS_GET_VERSION_DIRECTORY_46
    SVRS_GATHER_REQUEST_FRAGS
    Thanks..

    Hello
    I have tried with below code
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT RSWBO040 USING SELECTION-SET 'TEST'
                    EXPORTING LIST TO MEMORY
                   AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
       TABLES
         listobject = list_tab
       EXCEPTIONS
         not_found  = 1
         OTHERS           = 2.
    IF sy-subrc = 0.
       CALL FUNCTION 'WRITE_LIST'
         TABLES
           listobject = list_tab.
    ENDIF.
    break-point.
    Submitting the program(RSWBO040) of SE03 transaction a will result in 'CNTL_ERROR' dump.
    Please try some other options
    Thanks

  • Multiple Response Sheets for one form

    Hello,
    Can anyone tell me how to create multiple response sheets for the same form?
    For example, my sales team needs to send the form out to different companies, but needs their responses sepearted to analyze.
    Please Help!

    Hi,
    You can only have one active Response Sheet per form, this means that while you are using the same form for different companies, the responses that everyone submits will go to this one response sheet.
    However, if you just want to add other sheets in the 'View Responses' tab, for backing up data or other purposes, you can select Insert menu/Sheet in the 'View Responses' tab
    In your case, it sounds like you need a form per company or you can use one form and have a field requesting the user to enter the company name (or you can have a drop down for the user to select a predefined list of companies) and then once you received all the responses, you can sort or filter the responses in the table based on the company name, for example. Or export your responses in Excel format, and do the analysis there.
    thanks,
    Lucia

  • Multiple audio files for one flash video

    My company is developing a presentation software program that
    is flashed-based. We are developing a series of videos that will be
    converted to flash video. We will also be recording multiple audio
    tracks for different languages that we want to swap out and sync to
    the video (like the different audio language tracks on a DVD). Does
    anyone know if you can encode the video and audio to seperate
    tracks and then swap out the audio with another and still synch it
    to the video?
    We want to try and avoid encoding video for all the language
    tracks to save space. If we could have one video file and then
    multiple audio files that can be synched with the video file,
    rather than having to encode video and audio for each language,
    this would save a lot of room. Can anyone think of a way we could
    accomplish this using flash and flash video?

    nope, Keynote doesn't have "triggers" though I figure this has to be on Apple's radar as it's been brought up every time a new version comes out.
    I suppose one work around would be to make a slide for each sound, and have the sound play when you go to that slide. Then make your table a series of buttons that go to each "sound slide" (you can make link buttons, just not triggers). It would give you the effect of clicking to play the sound, it's just that instead, Keynote would be jumping to a slide and playing a sound. All the slides would LOOK the same, and you wouldn't use transitions between them. The effect would get you what you want, it just takes longer to build.

Maybe you are looking for

  • How can I update my Safari 5.1.10 without updating my OS 10.6.8 to Yosemite?

    How can I update my Safari 5.1.10 without updating my OS 10.6.8 to Yosemite?

  • Item Interest Calculation

    Dear all, We have configured item interest calculation. That is if the payment term is 25 days from the date of invoice, the grace days is 3 days. So if the payment is made on the 28th day, the interest should not calculate but if the payment is made

  • Database installation questions

    I am new to oracle database just want to download new oracle database 10g for learning But I am not sure which one I should download below? 1.Oracle Database 10g Release 1 (10.1.0.2) Enterprise/Standard Edition for Microsoft Windows (32-bit) 2.Oracle

  • Managed System Configuration step Assign Diagnostics Agent

    Dear Experts, We've newly instaled solution manager system 7.0 Ehp1 via latest sp stack 25 on aix 6.1, we've completed initial and basic configuraiton successfully via solman_setup, and instaled wily introscpe on same host with solution manager syste

  • Want JDk 1.4 for Linux(64 bit) RHEL4

    Hi all, I want to download JDK 1.4 for Linux 64 bit. I checked on sun.java.com,But I just got JDK 1.4 for 32 bit Linux machine. And there is JDK for 64 bit Linux intel itanium, which i m not abe to install on my Liux machine (with AMD architecure). D