Spilting a record into multiple record

Hi experts, need your help for your to frame a query for the below requirement
Scenario 1
For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
If minimum then select that record alone as shown below
Item DC Store Serviceare Bgn Date Service Area End date Priority
9856698 1469 2952 3/5/2011 12/31/9999 100
9856698 3107 2952 12/10/2011 8/3/2012 35
Item DC Store St Date End date Priority
9856698 3107 2952 12/10/2011 8/3/2012 35
Scenario 2
For a same store fetch the record with least priority (35) and check if the Servicearea begin date & Servicearea end date of that store is minimum for that group.
If not minimum split the records for that group as shown below and select the record which has the lowest priority(35) and with minimum startdate and end date range.
Item DC Store Serviceare Bgn Date Service Area End date Priority
9856698 1469 2952 3/5/2011 12/31/9999 35
9856698 3107 2952 12/10/2011 8/3/2012 100
Item DC Store St Date End date Priority
9856698 1469 2952 3/5/2011 12/9/2011 35
9856698 3107 2952 12/10/2011 8/3/2012 100
9856698 1469 2952 8/4/2012 12/31/9999 35

Here comes the scenarios.....
Scenario 1                              
Query should check for priority record(25), if the start_date and end_date of that priority record is the max i that group, records will not have any split.
output will be the same.
DC     Store     St Date     End date     Priority          
955     3     1/1/2010     12/31/9999     25          
966     3     4/5/2011     10/10/2011     50          
977     3     10/12/2011 12/12/2012     100          
output                         Priority     
955     3     1/1/2010     12/31/9999     25     1     
966     3     4/5/2011     10/10/2011     50     2     
977     3     10/12/2011 12/12/2012     100     3     
Scenario 2
If priority record is not covering the max range, then split the records as shown below,
1. during the time period 1/1/2011 & 4/30/2011 there were no other DC for that store so rank would be 1
2. the next range would be 5/1/2011 to 6/29/2011 we have 2 records in service so the record with low priortiy would be ranked 1 and second priority would be ranked 2
3. similarly, for 6/30/2011 to 10/1/2011 we have 3 records in service and it will be ranked accordingly on the priority.
DC     Store     St Date     End date     Priority          
966     3     6/30/2011     10/1/2011     25          
955     3     5/1/2011     11/30/2011     50          
977     3     1/1/2011     12/31/2011     100          
output                         Priority     
977     3     1/1/2011     4/30/2011     100     1     
955     3     5/1/2011     6/29/2011     50     1     
977     3     5/1/2011     6/29/2011     100     2     
966     3     6/30/2011     10/1/2011     25     1     
955     3     6/30/2011     10/1/2011     50     2     
977     3     6/30/2011     10/1/2011     100     3     
955     3     10/2/2011     11/30/2011     50     1     
977     3     10/2/2011     11/30/2011     100     2     
977     3     12/1/2011     12/31/2011     100     1     
Scenario 3     
This works similar to scenario 2
DC     Store     St Date     End date     Priority          
966     3     2/1/2011     12/31/2011     25
955     3     1/1/2011     12/31/2012     50          
977     3     5/1/2011     06/31/2011     100          
output                         Priority     
955     3     1/1/2011     1/31/2011     50     1     
966     3     2/1/2011     12/31/2011     25     1     
955     3     2/1/2011     12/31/2011     50     2     
977     3     5/1/2011     6/30/2011     100     3     
955     3     1/1/2012     12/31/2012     50     1

Similar Messages

  • How can I turn a recorded voice into multiple voices that sound like a group of singers?

    I'm using Logic Pro 9. Could someone teach me how to turn a single recorded voice into multiple voices that sound like a group singing together
    by mixing or other techniques ? I don't have the luxury of a group singing together with me when I do recording. Advices would be much appreciated!

    By far the most natural way to achieve this is for the singer to perform multiple takes - even if you've only one singer. At it's simplest, you could just double track the vocal part, although I prefer 3 parts - panned centre, left & right. Then repeat this process for each harmony, & mix accordingly.
    Melodyne & some of the above methods do work on am single voice, but phase cancellation can be an issue if your not careful with each part's timing & panning. If you can only get a couple of decent takes from the singer, far better to perform any harmony/pitching techniques on the second take to avoid any phase issues. It's not uncommon for a singer to perform each vocal part 5-10 times, then comp (edit) the best takes so that you end up with 3 decent takes.
    If you've only only one voice to work with Antares Harmony EFX is a useful alternative.
    http://www.antarestech.com/products/harmony_efx.shtml

  • Insert Insert XML file into multiple records in Oracle Database

    I would like to find out if it is possible to insert a single XML file into multiple records or tuples in a Oracle database table. I have a single XML file which is at multiple levels. The meta data for the levels are common and each level can have meta data of their own in addition. I do not have any meta data field which will uniquely determine whether the data belongs to Root level, Intermediate level or at the document level. Is there any way I can determine which level the meta data belongs to and thereby make a corresponding entry into the database table tuple? For example I could have an attribute called level which is going to be present only in the database table and not in the XML file. If level=1 then it corresponds to "Root" meta data, if level=2 then it corresponds to "Intermediate" level and if level=3 then it corresponds to meta data at document level. I need a way to calculate the value for level from the XML file and thereby insert the meta data element into a tuple in a single table in Oracle.

    Hi,
    extract your xml and then you can use insert all clause.
    here's very small example on 10.2.0.1.0
    SQL> create table table1(id number,val varchar2(10));
    Table created.
    SQL> create table table2(id number,val varchar2(10));
    Table created.
    SQL> insert all
      2  into table1 values(id,val)
      3  into table2 values(id2,val2)
      4  select extractValue(x.col,'/a/id1') id
      5        ,extractValue(x.col,'/a/value') val
      6        ,extractValue(x.col,'/a/value2') val2
      7        ,extractValue(x.col,'/a/id2') id2
      8  from (select xmltype('<a><id1>1</id1><value>a</value><id2>2</id2><value2>b</value2></a>') col from dual) x;
    2 rows created.
    SQL> select * from table1;
            ID VAL                                                                 
             1 a                                                                   
    SQL> select * from table2;
            ID VAL                                                                 
             2 b                                                                    Ants

  • Efficient Way of Inserting records into multiple tables

    Hello everyone,
    Im creating an employee application using struts framework. One of the functions of the application is to create new employees. This will involve using one web form. Upon submitting this form, a record will be inserted into two separate tables. Im using a JavaBean (Not given here) between the JSP page and the Java file (Which is partly given below). Now this Java file does work (i.e. it does insert a record into two seperate tables).
    My question is, is there a more efficient way of doing the insert into multiple tables (in terms of performance) rather than the way I've done it as shown below? Please note, I am using database pooling and MySQL db. I thought about Batch processing but was having problems writing the code for it below.
    Any help would be appreciated.
    Assad
    package com.erp.ems.db;
    import com.erp.ems.entity.Employee;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Collection;
    import java.util.ArrayList;
    public class EmployeeDAO {
         private Connection con;
         public EmployeeDAO(Connection con) {
              this.con = con;
         // METHOD FOR CREATING (INSERTING) A NEW EMPLOYEE
         public void create(Employee employee) throws CreateException {
              PreparedStatement psemployee = null;
              PreparedStatement psscheduleresource = null;
              String sqlemployee = "INSERT INTO employee (FIRSTNAME,SURNAME,GENDER) VALUES (?,?,?)";
              String sqlscheduleresource = "INSERT INTO scheduleresource (ITBCRATE,SKILLS) VALUES (?,?)";
              try {
                   if (con.isClosed()) {
                        throw new IllegalStateException("error.unexpected");
                            // Insert into employee table
                   psemployee = con.prepareStatement(sqlemployee);
                   psemployee.setString(1,employee.getFirstName());
                   psemployee.setString(2,employee.getSurname());
                   psemployee.setString(3,employee.getGender());
                            // Insert into scheduleresource table
                   psscheduleresource = con.prepareStatement(sqlscheduleresource);
                   psscheduleresource.setDouble(1,employee.getItbcRate());
                   psscheduleresource.setString(2,employee.getSkills());
                   if (psemployee.executeUpdate() != 1 && psscheduleresource.executeUpdate() != 1) {
                        throw new CreateException("error.create.employee");
              } catch (SQLException e) {
                   e.printStackTrace();
                   throw new RuntimeException("error.unexpected");
              } finally {
                   try {
                        if (psemployee != null && psscheduleresource != null)
                             psemployee.close();
                             psscheduleresource.close();
                   } catch (SQLException e) {
                        e.printStackTrace();
                        throw new RuntimeException("error.unexpected");
         }

    Hi ,
    U can use
    set Auto Commit function here ..
    let it be false first
    and when u do with u r all queries ..
    make it true
    this function take boolean values
    i e helful when u want record to be inserted in all or not at all..
    Hope it helps

  • Split the IDOC into multiple IDOC if the IDOC has more than 500 records

    Hi All,
    I developed an outbound IDOC in which we are facing an issue.
    There is some limitation on the maximum idoc size it can handle.
    If number of records is more than 500, split the idoc into multiple iDoc's, e.g. if it would have 1300 records , the result would be 2 iDoc's with 500 records, and the last one would have 300 records
    How can i acheive this.
    Regards
    Jai

    Hi,
    1) first you need to know which message type/Idoc type you are triggering.
    2) Get the Corresponding processcode from Partner profiles(WE20/ WE41).
    3) Then the look for prper user-exit in the related processing FM.
    4) write logic to split the IDoc accordingly.
    if no proper user exit available then copy the standard processing FM and need to all ALE related configurations.
    Catch hold any ABAP expert in your team to do all these.
    Suresh

  • HT201066 How can I split a long recording audio file into multiple audio files?

    Hi,
    How can I split a long recording audio file into multiple audio files?
    With Windows I was using Nero software, which is not available for Mac. Is there any similar app for free for Mac?
    Thanks!

    Hello ingiorgio
    You can import the track into GarageBand and then split the tracks there. Once that it is done you can highlight the ruler section and then share the song to iTunes to get them separated out. 
    GarageBand - Split regions in the Tracks area
    http://help.apple.com/garageband/mac/10.0/#gbnd76fcce04
    GarageBand - Share songs to iTunes
    http://help.apple.com/garageband/mac/10.0/#gbndfb96a96f
    Regards,
    -Norm G.

  • Split a record into multiple records

    Hi,
    I have situation where i need to split a record into multiple records.
    InputData :
    value|BeginDate |EndDate
    15 |2002/10/15|2002/10/16
    13 |2002/10/13|2002/10/20
    19 |2002/10/19|2002/10/23
    10 |2002/10/10|2002/10/12
    OutPut :
    10 |2002/10/10|2002/10/12
    13 |2002/10/13|2002/10/15
    15 |2002/10/15|2002/10/16
    13 |2002/10/16|2002/10/19
    19 |2002/10/19|2002/10/23
    Thanks

    Hi ,
    As a far I understood from your example ,
    I have few questions...
    1. You have information about the patient in a 1 source table.
    2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
    3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
    Or give some more information with a example ..that would be great ...
    Thanks

  • I use Exchange to sync my iphone4S with Outlook.  On my iphone, my contacts are split into multiple records if they have more than one email address - how can I consolidate them on the iphone

    i use Exchange to sync my iphone4S with Outlook.  On my iphone, my contacts are split into multiple records if they have more than one email address - how can I consolidate them on the iphone

    I have loaded my Firefox bookmarks into Internet Explorer Favorited. I also uninstalled Safari.
    I go to iTunes on my phone and see no wat to connect my iPhone to my laptop. I see Music, Shows, etc., the kind of stuff I would expect, but no clue as to how to proceed.
    Would you please be so kind to fill me in on how to "That syncing is done via iTunes. Connect the device to iTunes, select it, then go to the Summary page and select to sync bookmarks."?
    I am not sure what you mean by "Summary Page"
    Thank you

  • Splitting of a CSV File with Multiple Records into Multiple XML File

    Dear All,
    <b> I am doing a Scenario of CSV to XML Files. I am using BPM for the same. My incoming CSV File has got multiple records. I want to break this Multiple records into Multiple XML Files having one record each.</b>
    Can someone suggest how can I break this rather Split this into Multiple XML Files.
    Is Multimapping absoltely necesaary for this. Can't we do this without Multimapping. Can we have some workaround in the FCC parameters that we use in the Integration Directory.
    Kindly reply ASAP. Thanks a lot to all in anticipation.
    Pls Help.
    Best Regards
    Chakra and Somnath

    Dear All,
    I am trying to do the Multimapping, and have 0....unbounded also. Someways it is not working.
    <b>
    Smitha please tell me one thing...Assigning the Recordsets per Message to 1, does it mean that it will write multiple XML Files as I want.</b>
    Also I am usinf Set to Read only. So once the File is read it becomes RA from A. Then will it write the other Records.
    I have to use a BPM because there are certain dependencies that are there for the entire Process Flow. I cannot do without a BPM.
    Awaiting a reply. Thanks a lot in anticipation.
    Best Regards
    Chakra and Somnath

  • Convert one record row into multiple rows

    Hi,
       I have small requirement.I have selected one data base record into an internal table.Now internal table has 1 record i.e 1 row(ex: 10 columns). Now i will convert this single row record into multiple  records i.e 10 rows( 10 columns wil; be converted into 10 rows). How i will convert this. Please give me any idea on this.
    Regards
    Geetha

    Hi Geetha,
    Search SCN using keyword,  " convert Rows into columns" or vice versa,,,
    U will get more answers & solutions,
    Look at Some of the Previous threads....
    Re: How to create a structure of itab as rows as colums and columns rows dy
    Re: Transpose rows and columns
    CONVERT ROWS INTO COLUMNS IN INTERNAL TABLE
    Convert Internal table Rows into columns of another internal table
    how to convert columns of an internal table to rows of another internal tab.
    Convert Columns into Rows (internal tables) - Urgent Help Pleasse..
    converting columns to rows
    Thanks & regards,
    Dileep .C

  • Split a record into multiple records (rows)

    I am using ODI to move data from source system to target system .Both are Oracle . In the source system I have a record which I need to split into multiple records or rows in the target system based on some rules . How can I achieve this in ODI . Please explain

    Hi ,
    As a far I understood from your example ,
    I have few questions...
    1. You have information about the patient in a 1 source table.
    2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
    3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
    Or give some more information with a example ..that would be great ...
    Thanks

  • Split XML into multiple records

    Hi All,
    I have to split an XML field from a data type into multiple records on the target side.
    For eg: If the source XML string is something like this:
    <XML_STRING>
    <Data>
       <name>abc</name>
       <place></place>
             <addr1> </addr1>
             <addr2></addr2>
        </place>
       <name>xyz<name>
       <place>
             <addr1></addr1>
             <addr2></addr2>
         </place>
    </Data>
    </XML_STRING>
    Since the above XML string has two records in it (each record includes name and place), I would like to split those two into two separate records in the target structure and send it to ECC.
    How can I achieve this in PI mapping. Here in this case I cannot even differentiate between <> </> to split the messages since a single records might have multiple sub nodes in it. It is only believed that when "<name>" repeats again in the XML that would be a start of new record. Based upon that I need to split the records.
    Thanks in advance!!

    Hi Shweta,
    Minor correction is required for you source structure. Please follow Amit or Vila suggestion for content conversion.
    Did mapping as per your requirement. Please find the screen shot below. Please note the structure and cardinality of the element and node field.
    Hope result is as per your requirement.
    Regards
    Jitender

  • Displaying single value (Record) into multiple columns

    Hi All,
    I want to display the single record into multiple columns. Please let me know How to achieve this..
    Record:
    Lvl Activity Acre
    6 Week 4 (Same value to be displayed into 3 columns.)
    REquired output:
    lvl Activity PH1 PH2 PH3
    6 Week 4 4 4
    Thanks
    Kavi

    user533671 wrote:
    Hi,
    Thanks for immediate reply.
    PH1, PH2, PH3, ... will go more columns based on parameter , what we are passing.An single SQL statement cannot have a dynamic number of columns based on the data itself. The projection (columns returned) have to be known before any data is fetched... and that includes some 'parameter' value.
    {thread:id=2309172}
    You can build a query dynamically, based on a parameter or even on the data, but 99 times out 100 people use dynamic queries where they are not needed.
    Perhaps explain to us what you are really trying to achieve and why, and we could suggest some better way.

  • Tag an UCM document into multiple records

    What is the best way to tag a document into multiple records in UCM 11g ? In my webcenter application , a builder having site with many plots (say 100) wants a document in UCM to be tagged against some selective plots(say 1-10). He can again change the tagging (ie. he can add more plots or remove the tag from existing etc) . Each home owner will have either one or more plots . When the home owner logs in, he should be able to see that document which is tagged against that plot.
    Thanks ....

    Hi wilsonea,
    You're probably thinking of InDesign's Data Merge function.  Here are two links that may help you decide if this is what you're thinking of doing:
    InDesign Help | Data merge
    How to data merge in InDesign tutorial - YouTube
    If this is what you're thinking of, you'll need the design laid out in InDesign and a CSV file.  The above YouTube video provides a decent instructions on this.
    When you save your Excel file as a CSV file, I recommend that you also save it as a XLS (not XLSX) file too.  The CSV file will not save any formatting (like column widths and cell formatting), which makes it difficult to read the cell content whenever I have to use the file often.
    Hope this helps.  Cheers!

  • Inserting filename and page numbers into multiple PDF files?

    Have since seen this thread, BUT still interested in the syntax of the code
    to insert filename and page # into multiple files:
    http://forums.adobe.com/thread/951925?tstart=0
    Good Evening (GMT!)
    I have approx 100 PDFs with one or two pages in each, they are English translations
    of Russian language test certificates and the formatting/feel of the originals is lost in
    the translations. The only real link between the two sources is the "_RUS" and "_ENG"
    filename suffixes and the common leading filenames otherwise. Thus I need to maintain
    a record of the filename in any page I print off, should there be a need to refer back to
    the original if the translation is open to artistic licence.
    I have a script (below) that happily adds a page x/y and filename into the active file,
    what I would like is to be able to do this insertion into multiple files as defined by a
    portfolio or a selection via a select files dialogue box
    I am quite out of my depth now as my past skirmishes with JavaScript have set
    cookies and tweaked a few other browser doodads in webauthoring
    Any help most appreciated on this one...
    Kind Regards
    Dr B
    Southampton
    UK
    NB the filename inserted may be corrupted as a result of my last tweakings
    will sort that one out ASAP....
    ================================
    // SetRemoveFooter
    // Modified as marked
    // Menu item generation
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    //add page x of y
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //=====================================================================================
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = + this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "dd/mm/yyyy"
    var Box2Width = 100
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    //print output?
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    // TEXT SIZE SETTING
    fd.textSize=12; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    // print output?
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    // TEXT SIZE SETTING
    fp.textSize=12; fp.readonly = true;
    fp.alignment="center";
    //==========================================================================
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    will

    Putting this in a batch file within the automation function of Acrobat
    delivers the goods, I need to investigate the formatting of the output to
    get them to line up, have taken the middle ground and gone for a central
    position for the page x/y text...... some lines are redundant
    Dr B
    ===========================================
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
           var fd = this.addField("xftDate", "text", p, [30,15,
    TotWidth-30-30,30]);
           fd.value =  FileNM;
           fd.textSize=12; fd.readonly = true;
           fd.alignment="left";
    var bStart=(0);
    var bEnd=(TotWidth);
           var fp = this.addField(String("xftPage"p1), "text", p,
           fp.value = "Page: " + String(p1) "/" + this.numPages;
           fp.textSize=12;  fp.readonly = true;
           fp.alignment="center";

  • Adapter file sender doesn't split file into multiple message

    Hi everybody.
    We are in PI 7.0 SP10.
    In adapter file sender, I want to split a file into multiple file.
    We use protocole "file content conversion"
    in the field "recordset per message", I put the value 10 to test.
    The file content 30 records .
    The result we have is the treatment is not split into multiple message .
    The treatment is made but with one message.
    I need  to treat big files.
    Is there some one who have an idea  why t doesn't work ?
    Thanks in advance for your help.
    Regards
    Edited by: Eric  KOralewski on Jun 25, 2009 3:14 PM

    Hi,
    have you specified recordset name......if not, then specify it.............
    in recordset structure, specify like RECORD,1 and not RECORD,*
    again test your scenario......if still your file data is not getting split, then ask your basis guys to do a full CPACache refresh using PIDIRUSER..........your basis guys will know how to do it..........then again test your scneario............
    Regards,
    Rajeev Gupta

Maybe you are looking for