Track and capture the changes in OWB

I'm trying to merge data from two systems that have not been kept in sync. For example, I have 4 columns: my_key, lines, mod_date, and source. For the same my_key, lines changes over time (mod_date). I only want to capture the first change to lines (for a given change) regardless of which system the data comes from. Basically, I want to ignore all the rows in which my_key and lines are the same as the last row I selected. Here is some data and the desired results:
DATA in TEST_RANK table
my_key lines mod_date source rec#
A 150 01/01/2005 A 1
A 150 01/02/2005 B 2
A 100 01/14/2005 A 3
A 100 01/15/2005 B 4
A 200 01/19/2005 B 5
A 150 01/22/2005 A 6
A 150 01/25/2005 B 7
DESIRED RESULTS -
A 150 01/01/2005 A 1
A 100 01/14/2005 A 3
A 200 01/19/2005 B 5
A 150 01/22/2005 A 7
I tried w/ Ranking function but it didnt work as it looks for distinct group
SELECT * FROM ( SELECT my_key,lines,mod_date,ROW_NUMBER() OVER ( PARTITION BY my_key,lines ORDER BY mod_date ) m_rank from table_name ) where m_rank <= 1
M LINES MOD_DATE M_RANK
A 100 14-JAN-05 1
A 150 01-JAN-05 1
A 200 19-JAN-05 1
Is there any way I can do this in OWB using analytical functions ?
Thanks,
Shreedhar

Hi,
I don't think owb10g support analytic aggregation directly. But I know a way to introduce analytic funcations to the aggregation transformation. To achieve this, u'll have to execute some sql. Here's the sample scripts.
SELECT parameter_id,transformation_expression,parameter_name,
map_component_name,map_name,parameter_group_name
FROM all_iv_xform_map_parameters
WHERE map_name = 'MAP_DEMO'--The map name
AND MAP_COMPONENT_NAME = 'AGG_DEMO' --The aggregation name
AND PARAMETER_GROUP_NAME = 'OUTGRP1' --The group name
AND PARAMETER_NAME = 'ATTR'; --The attribute name
SELECT * FROM owb10g.cmpmappingparameter_v
WHERE elementid = &parameter_id;
UPDATE cmpallclasses
SET S3_5 = 'MAX('||chr(38)||'5)KEEP
(DENSE_RANK LAST ORDER BY '||chr(38)||'3)'
WHERE i_1 = &parameter_id;
--Here chr(38) is '&', use &5 to pass the 6th attribute
--in the input group to the analytic function
Hope this help.

Similar Messages

  • Execute a Query from a report sending it parameters and capture the result

    Hello everybody,
    Greetings from Peru, I want your help, Do you know how to execute a query from a report sending parameteres and capture the result in a internal table?
    The attached imaged has in red square the parameteres I want to send from a report.
    The idea is to have a JOB that executes everyday and parameters like DATE PERIOD will change automatically.
    Thanks for your time.

    Hi Enrique,
    You can call a query from a report by using submit statement.
    Every query has a corresponding program associated with it.
    Execute the query from SQ01. On te selection screen of query, goto SYSTEM  from menu and then click on STATUS, you will get program name (In this case aqzzzent_struct=zmm_ent_struc1). Use this program to call the query from your custom program.
    Also populate the rspar int table as per the selection criteria you want to pass to query.
       DATA: rspar     TYPE TABLE OF rsparams,
        wa_rspar  LIKE LINE OF rspar.
          wa_rspar-selname = 'SP$00001'.
          wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'.
          wa_rspar-option = 'BT'.
          wa_rspar-low  = s_cmp_cd-low.
          wa_rspar-high = s_cmp_cd-high.
          APPEND wa_rspar TO rspar.
       SUBMIT aqzzzent_struct=zmm_ent_struc1 WITH SELECTION-TABLE rspar AND RETURN.
    Thanks,
    Sachin

  • In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    Thank you, that was perfect!
    Yoni

  • I keep getting a warnin that my pages document could not be auto saved. The file has been changed by another application. Click save anyway to keep your changes and save the changes made by the other application as a version, or click revert to keep the c

    I keep getting a warning stating that the document could not be auto saved in pages. The file has been changed by another application. Then it says click save any way to keep your changes and save the changes made by the other application as a version, or click revert to keep the changes from the other application and save your changes to a version.
    What in the heck does all that mean, and why are they trying to behave like a Windows product or a Microsoft office product. I just don't get it.
    Why is another application changing my documents? It's like they've created a virus within their own programs. It's a pain in the neck and makes no sense.

    I am also having the issue of a warning saying "could not be auto-saved in Pages. The file has been changed in another application. I then hit "save anyway", the warning will go away for a time, sometimes minutes, sometimes hourr, but then the warming reapprears saying the same thing. This is not the case with all Pages documents but it is the case with many.
    Working with a Retina Macbook Pro and current software
    These are newly created documents

  • How do I copy and paste to my mac and undo the change attributes like I do withmy iPad. I cannot shake my mac?

    How do I copy and paste to my mac and undo the change attributes. On my ipad I can shake it and undo the change attributes but not sure how to do this on the imac? Example Excel to email and undo changes?

    Thanks for the information....It did not work,....
    I am copying information from Excel and posting it into Lotus
    It works fine in word and other application, just not in Lotus notes...
    Any other ideas?

  • Hi, I have private emails in IPAD2, i have chaged the incoming mail server name and saved the change.

    Hi, I have private emails in IPAD2, i have chaged the incoming mail server name and saved the change.
    but, when I back to read my old emails in inbox it's gone away, I have backed to setting and return the previous
    incoming mail name, but also I did't get the old emails. where I can find the old emails in my IPAD2 ?

    It is only the link to your emails which are 'stored' on your iPad. You will have to enter all proper email addresses to get the message associated with them, which, in practice,  means multiple accounts. If all still does not work try a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release].

  • How can I split my Dj mix into separate tracks and export the tracks

    How can I split my Dj mix into separate tracks and export the tracks. I'm trying to burn my Dj mix to cd and I don't want it to be one long track.

    Henryfrommo wrote:
    How can I split my Dj mix into separate tracks and export the tracks.
    http://www.bulletsandbones.com/GB/GBFAQ.html#exportsections
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Can we edit webi and deski reports and save the changes?

    Can we edit webi and deski reports and save the changed values for a particular column?
    If yes what rights should be granted to particular user?
    Will the report changes reflect at database end also?

    Both Web Intelligence and Desktop Intelligence comes with designers, where you have a GUI to design reports. 
    Web Intelligence you'd design in InfoView using the DHTML Report Panel or the applet-based Java Reporting Panel.
    Desktop Intelligence you'd use the Desktop Intelligence client.
    ReportEngine Java SDK (REBean) is what you'd use to programmatically create/modify Web Intelligence Documents.
    Desktop Intelligence Reporter COM SDK is what you'd use to programmatically create/modify Desktop Intelligence Documents.
    Sincerely,
    Ted Ueda

  • Help required in executing the stored procedure and capturing the responce

    Hi,
    I have to execute a stored procedure in oracle database and if it successful then have to create a status IDOC.
    The stored procedure may throw an exception(it is not an out parameter), in such cases i should capture the exception as part of the response message and send this information while creating the status IDOC.
    i would like if the below is possible.
    As the stored procedure is not returning( this means if you execute the procedure manually it will display the result), will it be possible to capture the result which has the exception details?
    any direction to this will be highly appreciated.
    Many thanks.
    Regards,
    Rahul

    @Bhaskar,
    i need to execute the procedure by sending the input data from a file and capture the result after executing the procedure to create a status idoc
    im not sure how the provided links helps me here.
    i m not looking for any look ups. i would like to know is there any way that we can capture the result after executing the database procedure?
    Edited by: Rahul_10416 on Dec 5, 2011 10:07 PM

  • How do you save changes made in iPhoto, and export the changed file.  It keeps reverting back to the original.

    How do you save changes made in iPhote, and export the changed picture file? When I select export, current format, it reverts to the original, wiping out all my work.

    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder.
    (On 10.7 or later: Hold the option (or alt) key while clicking on the Go menu in Finder to access the User Library)
    (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.

  • I have a custom template.  When I edit it and try to save it asks me to name it and then I end up with an additional custom template.  How do I edit the template and save the changes without creating another template?

    I have a custom template.  When I edit it and try to save it asks me to name it and then I end up with an additional custom template.  How do I edit the template and save the changes without creating another template?

    Hi Atrec,
    If you don't need your old custom template, save your changes with the same template name. It will tell you that this template exists and will ask you Replace? Say yes (if you do want to replace the old with the new!)
    To delete unwanted templates, go to Finder > Menu > Go and press the option key. Your Library will show in the Go Menu. Navigate to Library > Application Support > iWork > Numbers > Templates > My Templates.
    Delete any unwanted template by dragging it to the Trash or click on it then command-delete.
    Having gone to all that trouble to find My Templates folder, right click (or control click) on it and Make Alias. Drag the Alias to any convenient place for a quick way to get back to that folder.
    Regards,
    Ian.

  • To Capture the change Activity in Me23n

    Hi all,
    How do i capture the change activity (Display/Change) in ME23N ? I need to put validation in an Exit on SAVE clicked in Me23n with changes done to a PO in ME23n only by clicking change button.
    appreciate your ideas.
    Thanks,
    stock.

    Check for the fields TRTYP in table T160  passing the tcode.
       Masked                          
    A    Display                         
    B    Edit                            
    C    Display from archive            
    E    Single-item planning            
    H    Add                             
    V    Change                          
    X    Initial transaction             
    S    Standard parameter: normal mode 
    U    Convert indiv. planned order    
    L    Delete                          
    P    Planning file entry             
    K    Copy reference                  
    D    Print                           
    Regards,
    Ravi

  • Truly dumb question. How do I get PS to actually complete a command, eg straighten an horizon, and finalise the change. Even doing a "save as" with a new file name and reloading brings the image back, straightened, but with the skewed back ground frame st

    Truly dumb question. How do I get PS to actually complete a command, eg straighten an horizon, and finalise the change. Even doing a "save as" with a new file name and reloading brings the image back, straightened, but with the skewed back ground frame still there. Is there a "apply change" or similiar command that I simply cannot see.

    brings the image back, straightened, but with the skewed back ground frame
    PSE did what you told it to do. Choose the Straighten and crop edges or fill edges options when you use the straighten tool if you want it to do more than just straighten the contents of the image. Many people prefer the plain straighten because they'd rather crop themselves than let PSE do it.

  • Track and pay the logistics partner

    not too sure if this post should belong to this forum.
    we have logistics partners who help us to deliver stock to customer and charges us on the delivery.
    Currently, when they bill us, they will give us a list of stocks that they have shipped.
    our job is:
    1) verify the list of stocks are correct, not bill wrongly, etc. (majority of the verification based on the sales order transaction, we capture all sales in OM.)
    2) raise PR to pay for the service.
    any modules/features in EBS that help us on this?

    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
     Cheers, Tom

  • I cleaned up several albums in iTunes only to have Match wipe all of my changes out.  How can I alter things in iTunes and have the changes stay?

    I signed up for Match but when I added new albums, they failed to appear.  Ultimately I got a message to Sign Out and then Sign In to the Apple Store tab under iTunes.  I then added the computer back to Match.  It went through the process and uploaded the new albums (or matched them) but it also reversed hours of work I had done it editing my library and cleaning up track lists and song titles.
    HOW CAN I edit/maintain my library without Match wiping every change out?????
    And when will the Cover Art issue be solved???

    Match was off.  I made all of the changes and then went through the "Turn on iTunes Match" option.  I now have deleted some tracks, edited the Metadata in CDDA, and then added it back.  This worked fine, but it is not a good solution.
    I just tried making some edits and use the "Update iTunes Match" and that seemed to work.  It looks like the real answer is that Match must be up and operational, then you can make changes and run the Update to incorporate the changes.  However, if Match has a problem then Signing Out and back in to your store account and going through the process of Turning On Match (were you get the questions, "Add this Computer to Match" will overwrite any changes. 
    Since this relies on the stability of iTunes, I won't be making a lot of changes between updates.

Maybe you are looking for

  • CURSOR IN IF Statement

    HI , I want to write a cursor in IF stmt IF NOT (( emp_rec.empno IN (9981, 9980, 9975, 9968) AND emp_rec.sal< 51)) instead of freezing the values (9981, 9980, 9975, 9968) i have taken them in a table now i want to write a cursor on the table fetching

  • Flex Mobile, URLLoader and Sessions

    I have created a Flex Mobile Project that I've been testing so far on a Motorola Xoom and uses the URLLoader object to query some JSP pages and return the output. These JSP pages require user authentication which depend on sessions. If my URLLoader r

  • Oracle 8i Stored Java Procedure and OAS 4.0.8

    Hi, I'd like to call a Java Stored Procedure from the OAS, like an ordinary PL/SQL package. The Java Stored Procedure should generate HTML-code to display in the browser. My first try was, to use the SQL wrapper function and the PL/SQL cartridge of t

  • Purchase Requisitions in IW37 Output

    The 'Purchase Requisition' column in the output of IW37 is always blank though an examination of individual work orders listed in the output reveals requisition numbers on many of the operations.  What is the purpose of the 'Purchase Requisition' col

  • Pls send me Idoc to file scenario in XI

    thanks& regards Ganga