How to replicate data in this manner

Hi everyone
I have a table in which there are 3524 records
and the value in a column is constant now i want to replicate the whole 3524 records but the primary key need to be incremented and the value in that constant column need to be changed
here is the str
id    product age item
1    15         10   2500
2     20        10   3000
3    25         10   4000here my age column is constant, now i want to replicate whole data and the age in that data need to be suppose 11
and the sequene should be 3525 to 7048
Edited by: Peeyush on Jan 10, 2011 2:06 AM

Peeyush wrote:
will it be feasibleYes
i mean would it take too much time No. Like 10 seconds
cause i have to do the same for the age 11 to 75That is a new requirement. You could have mentioned it right at the start.
and i am short of timeSo what are you trying to tell us? No time to hire a consulant to do the work for you?
By the way thanks for the help
if you find a better solution like i have to do the whole thing 65 times then plz post..Sure we have:
using what carlovski already gave you
insert into [table_name] (id, product, age, item)
select id + 3524*age,
          product,
          10+age,
          item
from [table_name]
cross join (select level age
   from dual
   connect by level <=(65-10))Untested of cause since you didn't provide any create table statements.
Edited by: Sven W. on Jan 10, 2011 11:24 AM

Similar Messages

  • How to replicate data from MS SQL Server  to Oracle

    Hi,
    Can someone please help me on how to replicate data from MS SQL Server to Oracle 8i database.

    Dear,
    I'm a student.
    I do simple replication on Oracle 8.0.5 successfully. (one master site and one snapshot site). I only use the SQL*Plus and Schema Manager to do.
    But when I do advance replication (multimaster replication) I meet many problem. So I don't get the result.
    Do you show me the technology to do that ?
    Thanks !

  • How to retrive data from this inernal table

    hi,
    could u please explain clearly how to retrive the records  from this structure
    data: begin of itab.
    include structure sflite.
    data:end of itab.
    how to retrive data from this structure could u plz give me a code with example.

    Hi,
    TYPES: BEGIN OF struc1,
                    val1 TYPE c,
                    val2 TYPE c,
                 END OF struc1,
             BEGIN OF struc2,
                   val type struc1,
                   val3 TYPE c,
                   val4 TYPE c,
                END OF struc2.
    DATA: l_f_str1 type struc1,
          l_f_str2 type struc2.
    START-OF-SELECTION.
      l_f_str2-val-val2 = 'a'.
      write : / l_f_str2-val-val2.
    END-OF-SELECTION.

  • How to replicate data to hana server based on company code?

    I have huge data in ECC system related to different company codes in multiple tables.
    So while replicating data into hana system i want to pass company code as a parameter for selected tables.
    Cos we have size constraints in HANA server.
    So plz help to get the selected data.
    You have my thanks in advance.

    I am a little puzzled by your question. Is your requirement that if you change the parameter, only that data gets loaded into HANA and how often do you intend to change the "parameter"?
    You can use IUUC_REPL_CONTENT to restrict the data coming in, for example you can define a where clause such that where BUKRS = 'XXXX' so only XXXX entries get replicated. I recommend to take a look at note 1733714 as this note has the guide which shows you how to define these transformations in the SLT server.
    However if your goal is every time, you need to load different company codes, you will probably have to change the transformation, then reload the table dropping all the data you already have loaded. This essentially defeats the purpose of real time replication though.
    One other alternative is create different views for different company codes in the source ECC, then use the views for replication. Take a look at this blog for information on how to replicate views.

  • How to replicate data from custom field in SRM to ECC

    Hi,
    I am using SRM 5.0, as per my requirement i need to get data from SRM (Web GUI) through custom fields in "Confirm Goods",
    and need to pass this data to ECC,
    I found that Message type MBGMCR; IDOC Type u2013 MBGMCR01 can be used for passing the data from SRM to ECC,
    How can i pass the new data to this IDOC in SRM
    and how can i get the data from this IDOC in ECC
    Please help.
    Thanks in advance,
    Jerin.
    Edited by: Jerin Joseph on Jul 23, 2009 5:06 PM

    Hello,
    This will help you.
    Re: Replicating GR custom fields from EBP to SAP R/3
    Thanks
    Ashutosh

  • How to retrieve data from this XML

    Hi
    I am getting below XML file and I need to get data from the file into table in a database ( SQL SERVER ). Please kindly help to shred and load the data into a table 
    <claimInvoice xmlns="http://www.XYZ.com">
      <INum>INum1</INum>
      <dueAmount xmlns="">1</dueAmount>
      <Billadd xmlns="">Billadd1</Billadd>
      <remittance xmlns="">
        <RemCom>RemCom1</RemCom>
      </remittance>
      <summary xmlns="">
        <title>title1</title>   
        <accountAging>
              <totalDue>1</totalDue>
        </accountAging>
    </summary>
    </claimInvoice>
    How Can i get  data for the following :
    INum,
    dueDate,
    Billadd,
    RemCom,
    title,
    totalDue
    Thanks
    Kodi

    see illustration below
    declare @x xml='<claimInvoice xmlns="http://www.XYZ.com">
    <INum>INum1</INum>
    <dueAmount xmlns="">1</dueAmount>
    <Billadd xmlns="">Billadd1</Billadd>
    <remittance xmlns="">
    <RemCom>RemCom1</RemCom>
    </remittance>
    <summary xmlns="">
    <title>title1</title>
    <accountAging>
    <totalDue>1</totalDue>
    </accountAging>
    </summary>
    </claimInvoice>'
    ;WITH XMLNAMESPACES ('http://www.XYZ.com' AS def)
    SELECT t.u.value('def:INum[1]','varchar(50)') AS INum,
    t.u.value('dueAmount[1]','int') AS dueAmount,
    t.u.value('Billadd[1]','varchar(10)') AS Billadd,
    t.u.value('(remittance/RemCom)[1]','varchar(50)') AS RemCom,
    t.u.value('(summary/title)[1]','varchar(50)') AS title,
    t.u.value('(summary/accountAging/totalDue)[1]','int') AS totalDue
    FROM @x.nodes('/def:claimInvoice')t(u)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to replicate data  between Oracle db and SQL server dbs in real time?

    Hello,
    Anyone has idea that what tool we can use to do data replication in real time between Oracle and SQL sever or Oracle and Sybase or Sql server and Sybase?
    This is topic is brought by a project manager?
    I only know Oracle to Oracle dbs by streams or GoldenGate.
    Thanks
    Jerry

    Since GoldenGate's bread and butter was (and is) replicating data between heterogeneous data sources, and since Oracle has purchased GoldenGate, that would seem like a natural place to start.
    Beyond that, it depends on the architecture you want and how you define "real time." Just about any ETL tool on the market, whether Oracle's ODI or OWB or any number of third party products (Informatica, DataStage, etc) can handle "trickle feeds" from various data sources to a database target of your choosing. Different tools will have different sorts of integration with the source database, many will require that a bunch of triggers are created to track changes on the source systems.
    If you want Oracle to control the replication process (which doesn't really make sense if we're talking about replication from a non-Oracle database to another non-Oracle database), you can use the Oracle Transparent Gateway products to create database links from Oracle to the non-Oracle databases and query data on the source database periodically.
    Justin

  • How to replicate data ...help pl.. ?

    Hi Friends,
    I have two similar oracle databases one in my office and another in remote area connected through leased line, i want to replicate few tables from my office database onto remote database. Any new rows inserted in office tables it should be reflected in the remote tables immediately.
    One method I know is using snapshots can be refreshed auto or manually whenever we want, can it be done using materialized views…? if so how (briefly)? Is there any easy and new methods available in 9i ?
    pl. help ...

    Hi Joe
    Thanks for immediate response.
    Actually I am confused with Snapshots and materialized views... both are same or they are different? in your reply you mentioned 'materialized view (snapshot)'.
    besides this one of my friends gave one solution just go thru it..
    'Simply Create a DBLink between the databases and
    create the materalized views on the required tables
    and referesh them on commit on base table,u will get
    the exact replica of the tables on the other database'
    Is the same what you are talking about?
    please..
    If the remote database is read only, it can use materialized view (snapshot) to do so.
    On your office db, create snapshot log on the tables you want to rep.
    create materialized view log on <tables>
    including new values;
    on the remote db to create a snapshot and refresh every day:
    create snapshot <snapshot_name>
    REFRESH FAST NEXT SYSDATE + 1 <your querys>;

  • How to extract data for this tcode

    Hello BW Experts,
    I have a transaction code in R/3. i observe that is a using a program P1 and structure S1 to generate the table display in the r/3 transaction.
    i go to se38 and display the code, it seems to be a module pool.
    Any suggestions for extraction of this data is highly appreciated.
    Thanks,
    BWer

    Hi,
       if you know ABAP, analyze the code, which tables are getting update with that. based on these tables either you can create generic extractor or you can search for business content.
    you can use SQL Tracer also to find the tables.
    go to ST05 --> SWITCH ON THE DEBUGGER(sql trace) > go to your custom transaction> create a entry> then come back to st05 deactivate the trace> then go with display trace.
    there you will see what are the tables used for this.
    Hope this helps.
    All the best.
    reagrds,
    Nagesh Ganisetti.

  • How to extract data from this Variant?

    Hi All,
    I hope someone could help me in solving this  problem.
    I have a VARIANT variable named "num". I know that it contains an array of strings. By using the command:
     type = CA_VariantGetType(&num);
    I obtain type=4211, that should correspond to an array of BSTR.
    However, if I add "num" to "watch expression", I get "value={VT_BSTR | VT_ARRAY}" and the bitwise OR is 8200.
    Now my questions are:
    1- is it possible to see this array directly from the watch expression?
    2- how can I extract this array of strings from the VARIANT?
    This is really becoming challenging for me...
    Regards and thanks for the attention
    Francesco

    You're right, maybe it won't work with an array of BSTR.
    In this case I think we have to options since in LabWindows/CVI we have the possibility to store an array of BSTR as a pointer using the function CA_VariantSetBSTRPtr () but we can also store it as an array using the function CA_VariantSet1DArray ().
    You can know which of them was used to create your variant by using the function CA_VariantHasPtr ()  that returns TRUE only if the variant was created using CA_VariantSetBSTRPtr () and you can use CA_VariantHasArray () that returns TRUE if the variant was created using the CA_VariantSet1DArray ().
    Once you know how your variant was created you can convert it to the array of BSTR using the function CA_VariantGetBSTRPtr()  or CA_VariantGet1DArray().
    I created a little project and tested this functions. 
    As you can see, the code creates an array of BSTR strings and store them in two different variants using both the ways I explained and then convert the variant back to two array of strings (they are pointers actually) and take the first string of both pointer that can be seen into the watch-expression window.
    Here you have the code:
    size_t numberOfElements;
    BSTR *myNEWBSTRArray;
    BSTR *myNEWBSTRPointer;
    HRESULT variantHasPointer;
    HRESULT variantHasArray;
    unsigned int variantTypeBSTRPointer;
    unsigned int variantTypeBSTRArray;
    BSTR myBSTR[3];
    VARIANT myVariantBSTRPointer;
    VARIANT myVariantBSTRArray;
    char *ptrString;
    char *arrayString;
    BSTR firstOfPtr, firstOfArray ;
    //Allocate Variants
    myVariantBSTRPointer = CA_VariantEmpty ();
    myVariantBSTRArray = CA_VariantEmpty ();
    //Create the array of BSTR strings
    myBSTR[0] = SysAllocString(L"I am a happy BSTR");
    myBSTR[1] = SysAllocString(L"I am another happy BSTR");
    myBSTR[2] = SysAllocString(L"I am one more happy BSTR");
    //FIRST WAY: Convert the BSTR array to a BSTR pointer variant
    CA_VariantSetBSTRPtr (&myVariantBSTRPointer, myBSTR);
    //Get the variant type
    variantTypeBSTRPointer = CA_VariantGetType (&myVariantBSTRPointer);
    //this is true since the variant was created as BSTRPtr
    variantHasPointer = CA_VariantHasPtr (&myVariantBSTRPointer);
    // Retrieve the BSTR array as a new BSTR pointer
    CA_VariantGetBSTRPtr (&myVariantBSTRPointer, &myNEWBSTRPointer);
    //Take the first BSTR string stored in this array
    firstOfPtr = myNEWBSTRPointer[0];
    //SECOND WAY: Convert the BSTR array to a 1D array of BSTR variant
    CA_VariantSet1DArray (&myVariantBSTRArray, CAVT_BSTR, 3, myBSTR);
    //Get the variant type
    variantTypeBSTRArray = CA_VariantGetType (&myVariantBSTRArray);
    //this is true because this second variant was created as 1DArray
    variantHasArray = CA_VariantHasArray (&myVariantBSTRArray);
    //Retrieve the BSTR array as 1DArray.
    //NOTE: myNEWBSTRArray is a BSTR* just like myNEWBSTRPointer variable was.
    CA_VariantGet1DArray (&myVariantBSTRArray, CAVT_BSTR, &myNEWBSTRArray, &numberOfElements);
    //Take the first BSTR string stored in this array
    firstOfArray = myNEWBSTRArray[0];
    //Convert the two BSTR strings to C-Strings that can be seen into the watch-expression
    CA_BSTRGetCString (firstOfArray, &arrayString);
    CA_BSTRGetCString (firstOfPtr, &ptrString);
     Let me know if it helps
     Best Regards
    Luca Gallo
    Application Engineer
    National Instruments Italy

  • How to extract data from this namespace

    Hi all,
    Anyone knows how to extract the value ABC from the XML below namespace ?
    HELP !!!!
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:CompanyCode xmlns:ns0="http://xidevt.sec.abc.net/common">ABC</ns0:CompanyCode>
    Thanks in Advance

    Hi,
    I am trying to use this ABAP command to extract the value ABC from the below. It does not seems to retrieve it. Can anyone tell me what is wrong with it
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:CompanyCode xmlns:ns0="http://xidevt.sec.abc.net/common">ABC</ns0:CompanyCode>
    My ABAP code is as follows.
    a_ncoll1 = a_idocument->get_elements_by_tag_name_ns( name = 'CompanyCode' ).
      a_node1   = a_ncoll1->get_item( 0 ).
      elmt_value = a_node1->get_value( ).

  • How to replicate data from one page to another page

    I have a five page document that has the same information on all five pages but each page goes to a different person. I want to fill-in the first page and have the information replicate to the other four. Any suggestion?

    Are you using LiveCycle (XML form)?
    If so you need to set the binding for the fields to "Global".

  • Replicate Data with JApi

    As I am new to this forum first:
    "Hello to all !"
    Does anybody has an idea, how to replicate data from one cube to another cube with the essbase java api ?
    Problem:
    I have a Webserver running and the webapplication is developed with jsp.
    I want my users give the possibility to replicate data from a source cube to a target cube.
    it would be great if i could integrate this into my jsp's.
    (Essbase 7.1.0 )
    thank you
    Crashi

    It depends on what you want to do.. The Java API gives you almost limitless possibilities.
    For example, do you want the second cube in synch? You could use the API to update the outline on the fly as well.
    Alternatively, do you want to export from the first cube and then load data with a load rule? You can do that too. It all depends on what you want to do given the limitations of the Java API.
    Addressing the limitations of the API.. In 7x, the main items missing from the API was the ability to create load rules; none of the Essbase APIs currently support that. Further, you could not do anything with Essbase security/users/filters/etc nor could you create partitions. In 9.3.x, the ability to manipulate security/users/filters/etc was added.
    Tim Tow
    Applied OLAP, Inc

  • How to convert date dd.mm.yyyy TO Month ddth YYYY?

    hi friends,
    how to convert date into this format.
    ex:
    date : 04.11.2008
    has to convert as
    October 04th, 2008
    th has to be set SUPERSCRIPT.
    Plz any helps....
    Regards,
    Shankar.

    check this..FM
    CONVERT_DATE_TO_EXTERNAL
    or we can do this using split or concatenate functions like below
    *CALCULATING THE MONTH FOR THE BODY OF THE EMAIL MSG
      IF GD_EBODY_BB = '01' .
        GD_EBODY_BB = 'January' .
      ELSEIF GD_EBODY_BB = '02' .
        GD_EBODY_BB = 'February' .
      ELSEIF GD_EBODY_BB = '03' .
        GD_EBODY_BB = 'March' .
      ELSEIF GD_EBODY_BB = '04' .
        GD_EBODY_BB = 'April' .
      ELSEIF GD_EBODY_BB = '05' .
        GD_EBODY_BB = 'May' .
      ELSEIF GD_EBODY_BB = '06' .
        GD_EBODY_BB = 'June' .
      ELSEIF GD_EBODY_BB = '07' .
        GD_EBODY_BB = 'July' .
      ELSEIF GD_EBODY_BB = '08' .
        GD_EBODY_BB = 'August' .
      ELSEIF GD_EBODY_BB = '09' .
        GD_EBODY_BB = 'September' .
      ELSEIF GD_EBODY_BB = '10' .
        GD_EBODY_BB = 'October' .
      ELSEIF GD_EBODY_BB = '11' .
        GD_EBODY_BB = 'November' .
      ELSEIF GD_EBODY_BB = '12' .
        GD_EBODY_BB = 'December' .
      ENDIF .
    *ATTACHMENT SUBJECT LINE MODIFICATION
      IF GD_EBODY_CC = '01'.
        CONCATENATE GD_EBODY_CC 'st' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '02' .
        CONCATENATE GD_EBODY_CC 'nd' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '03' .
        CONCATENATE GD_EBODY_CC 'rd' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '31'.
        CONCATENATE GD_EBODY_CC 'st' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '21'.
        CONCATENATE GD_EBODY_CC 'st' INTO GD_EBODY_CC .
      ELSE .
        CONCATENATE GD_EBODY_CC 'th' INTO GD_EBODY_CC .
      ENDIF .
    regards
    ansumesh
    Edited by: Ansumesh Kumar Samal on Nov 4, 2008 9:02 AM

  • How to  load data into user tables using DIAPIs?

    Hi,
    I have created an user table using UserTablesMD object.
    But I don't have know how to load data into this user table. I guess I have to use UserTable object for that. But I still don't know how to put some data in particular column.
    Can somebody please help me with this?
    I would appreciate if somebody can share their code in this regard.
    Thank you,
    Sudha

    You can try this code:
    Dim lRetCode As Long
    Dim userTable As SAPbobsCOM.UserTable
    userTable = pCompany.UserTables.Item("My_Table")
    'First row in the @My_Table table
    userTable.Code = "A1"
    userTable.Name = "A.1"
    userTable.UserFields.Fields.Item("U_1stF").Value = "First row value"
    userTable.Add()
    'Second row in the @My_Table table
    userTable.Code = "A2"
    userTable.Name = "A.2"
    userTable.UserFields.Fields.Item("U_1stF").Value = "Second row value"
    userTable.Add()
    This way I have added 2 lines in my table.
    Hope it helps
    Trinidad.

Maybe you are looking for

  • There is a problem with adobe acrobat reader please exit adobe acrobat reader and try again 101:101

    I'm trying to access some web PDF files via SharePoint Application but i got this error message "there is a problem with adobe acrobat reader please exit adobe acrobat reader and try again 101:101" my operating system is Win 7 and I'm using Adobe Acr

  • Speaking text in different languages

    I am using my Mac server to answer the phone and play answering machine. I like it to read messages to callers using the build in voices. However if I write massages in other languages but English even I would not know what it is saying and I doubt a

  • Approval process should proceed if deadlins is missed

    Hi all, In the workflow WS10400002 (One-step approval) in SRM, when the deadline had exceeded the approval should happen automatically. While checking in the latest end tab, an alert mail can be triggered. but how do we make sure that the approval pr

  • NokiaMServer.exe removal

    HI there, I am added this to the end of another thread but it seems that it might not be read there so I am adding a new topic as it might be noticed this time around. I have uninstalled all the software for the Nokia phone on my PC but for some reas

  • Taking exactly 10 min to open the task list using smartview

    Hi All, We are using hyperion smartview 11.1.2.2 when I connect to hyperion planning task list using smartview it is taking exactly 10 min to open the task but the same is taking only 3 seconds in our Production environment. Can someone help me out.