Transferring data from one table to another table using a Keycolumn using SSIS row by row dynamically

Hi All,
I have a Store Procedure(SP) which has a output variable name "AcivityID" which is the key column. In this SP, transformation  of data is done from one table to insert data into other table. I have to execute the SP and insert row by row data
using the output variable "ActivityID"  whose value will keep on changing. How can I do it?
Thanks,
Kallu

Value changing on a row by row basis? Not quite sure what you mean, but it seems that you want to use the results of an insert into one table as input for another. If so then SSIS is not needed, inside the stored proc use the SQL that will do that and for
all records as
INSERT A INTO dbo.table1
OUTPUT INSERTED.A INTO MyTable;
Arthur My Blog

Similar Messages

  • BADI for transfering data from one modal to another modal within single appset

    Hallo Experts,
    My Business Requirement is Transfer of data from one modal to another in same environment and did this taking reference from below document.(How to custom badi for replicating destination app)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e04b5d24-085f-2c10-d5a2-c1153a9f9346?QuickLink=index&…
    Document contains TR for implementing BADI, but this document supports bpc version 7.0 and we are using is bpc 10.0.
    So i make all compatible changes in BADI implementation and activate it. Now i am testing using transaction UJKT using following script.
    and the result is records successfully written back to application MIS, but when i check data is not moved to target application MIS.
    I am facing stuck situation in my project work. Please Suggest. Hope for positive reply.
    Script:
    *XDIM_MEMBERSET WM_ACCOUNT = WM_041,
    *XDIM_MEMBERSET WM_UOM_02 = UOM_004
    *XDIM_MEMBERSET WM_UD_2 = WM_07
    *XDIM_MEMBERSET WD_EXT_MAT_GRP =CHALK-PH-I,CHALK-PH-II,CHAVN-PH-I,CHAVN-PH-II,NASHIK-WM,RAJASTHAN-WM,TAMILNADU-WM
    *XDIM_MEMBERSET CATEGORY= Plan
    *XDIM_MEMBERSET AUDITTRAIL=Input
    *XDIM_MEMBERSET P_ENTITY = SIL
    *XDIM_MEMBERSET RPTCURRENCY = LC
    *START_BADI DAPP
       DESTINATION_APP ="MIS"
       RENAME_DIM ="WD_EXT_MAT_GRP= PRODUCT"
       ADD_DIM ="PLANT=NO_PLANT","MIS_ACCOUNTS=CAIN0058040008","COST_CENTER=NO_COST_CENTER","FLOW=Opening","UOM=AMT","CUSTOMER_SALES_2=NO_CUSTOMER","CATEGORY=Plan","AUDITTRAIL=Input"             
       DEBUG = ON
       WRITE = OFF
       QUERY = ON
    *END_BADI
    Please find attached result.
    Regards,
    Dipesh Mudras.

    Hello,
    Here is the manual to copy data between apps (it works with BPC NW75):
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0480970-894f-2d10-f9a5-d4b1160be203?quicklink=index&overridelayout=true
    It works me, but now I need to modify the Script Logic to make that a "property" from the origin dimension has to be copied to the destination dimension as "id", like follow:
    //*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    //*XDIM_MEMBERSET TIME = %TIME_SET%
    //*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
    //*XDIM_MEMBERSET RPTCURRENCY =  %RPTCURRENCY_SET%
    *START_BADI FiltroPD
         WRITE = OFF
         APPL = $APPLICATION$
         ADD_DIM = "ORIGEN = APPVENTAS"
         ADD_DIM ="O_COSTE = no_input"
         ADD_DIM="CECO = no_input"
         RENAME_DIM="P_ACCT = RATIOS.P_ACCT "
    *END_BADI

  • Help transferring data from one account to another

    I bought my computer in August 2008 and had previously had an iBook. When transferring my data from my old computer to the new one, I guess I did it wrong so instead of it transferring all to the same place it created two accounts.
    Is there way to transfer my music/pics etc to my main account?
    Also, my iphone is backed up the other account because thats where all my music is, is there a way to also keep all this data once I am using only the main account?

    When you use Migraine Assistant, it transfers the account of the older machine to the newer because the users name is involved in everything, like iTunes playlists etc.,
    Since to run Migraine Assistant you need to have gone through setup on the Mac and created the main Admin account, when you Migrate, you transfer the other account so you wind up with two accounts on the new machine.
    All you have to do is log into the Admin account of the first user you created, then change the acount status of the Migrained account to Admin and reboot, check it out well, then delete the first Admin account at your own leaisure. However it's best to leave two accounts on the machine, just in case your locked out for some reason.
    If you rather transfer your files from one account to another use the Shared Drop Box
    If you have three accounts on the machine (original admin and two migrained migrateda accounts), you'll just have to monkey around and clean up the mess.

  • Fatal error while transferring data from one bb to another

    I was trying to transfer data from one bb to a different bb using the bb desktop manager tool.  It collected all the data from the first bb fine and then while transferring data to the new one it said a fatal error occured to try again.  That bb will not even turn on now.  No white screen or anything.  Its like there is no operating system.  I don't know what to do.  I tried to connect it and just update the software but that isnt working either.  Says it is not responding during initialization! I think I killed it.... any ideas what to do???

    You can try to reload the OS in one of the following ways
    http://www.blackberry.com/btsc/KB03485
    http://blackberryfaq.net/index.php/How_do_I_wipe_the_BlackBerry_using_Jl_Cmder%3F
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

  • Performance issue while transferring data from one itab to another itab

    hi experts,
    i have stored all the general material details in one internal table and description, valuation details of the meterial is stored in another internal table which is of standard table. now i need to tranfer all the data from these two internal tables into one final internal table but it is taking lot of time as it has to transfer lacs of data.
    i have declared the output table as shown below
    DATA:
      t_output TYPE standard TABLE
               OF type_output
               INITIAL SIZE 0
               WITH HEADER LINE.
    (according to the standard i have to declare like this and the two internal tables are declared similar to the above one)
    could somebody suggest me how shall I procced through this...
    thanks in advance....
    ragerds,
    Deepu

    Have a look at the following article which you may find useful:
      <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40729734-3668-2910-deba-fa0e95e2c541">Improving performance in nested loops</a>
    good luck, damian

  • Transferring data from one schem to another

    Hi:
    I am looking for an efficient way to transfer all the records from one table in a certain schema to it's identical counterpart in another schema. Both schemas are in the same Instance. The tables are "identical" in that they have the same columns as metadata. Any suggestions?
    I would like this to be as quick a transfer as possible, so, if it would speed things up, I would like to consider deferring update of indexes of the receiving table until after the records have moved. Is that sort of thing possible? A less attractive approach would be to drop all the indexes, then transfer the records, then recreate all the indexes.
    The receiving table will be truncated just prior to the transfer, so perhaps all forms of journaling/undo can be shut off (no need to recover if the transfer failed)
    Thanks for any help

    You could certainly drop and recreate the indexes as another part of the answer, but the fastest transfer would be a direct-path insert:
    insert /*+ append */ into target
      select * from source;

  • Transferring data from one DB to another DB

    Hi Experts,
    In production database 30 tables are there in different schemas.
    In some tables data is existed for 5 years
    in some tables data is existed 8 years
    in some tables data is existed for 6 years.
    And all these tables are having billions and millions of records.
    Let us assume the tables in the production database are
    Table1 -- 8 years data -- No. Of Records 3538969000
    Table2 -- 6 years data -- No. Of Records  592844435
    Table3 -- 3 years data -- No. Of Records   33224993
    Table4 -- 4 years data -- No. Of Records   52361756
    Table5 -- 5 years data -- No. Of Records    8948567
    Table15 -- 6 years data -- No. Of Records 308476987Now I want to trnasfer these 15 tables data to test database.
    Based on the following conditions.
    For Table1 I want to transfer 6 years data to test database, keeep 2 years data in production
    and delete all 6 years data from production databse.
    For Table2 I want to transfer 4 years data to test database, keeep 2 years data in production
    and delete all 4 years data from production databse.
    For Table3 I want to transfer 2 years data to test database keeep 1 years data in production
    and delete all 2 years data from production databse.This will be done periodically.
    I.e. suppose if we run the script now and transfer the requested data to test database,
    again after one year the data got increased in production then again we have to run the
    script and transfer data to test database based on some conditions,so it should work for
    long time.
    Please help me what is the good and fast process to transfer the data.
    Thanks in advance.

    Thanks for your information.
    Hi ,
    To make the process dynamic why we want to make it dynamic in future any tables needs to e archived
    only one script should execute.
    I have created the below control table to pass ID, TABLE_NAME, ARCHIVE_TABLE_NAME, WHERE_CONDITION dynamically.
    ID  TABLE_NAME ARCHIVE_TABLE_NAME  WHERE_CONDITION
    1   Table1     archive_table1       created_date< MONTHS_BETWEEN(SYSDATE,-24)
    1   Table2     archive_table2    Accepted_date< MONTHS_BETWEEN(SYSDATE,-24)
    1   Table3     archive_table3    last_proposal_date< MONTHS_BETWEEN(SYSDATE,-24)
    1   Table4     archive_table4    lat_modified_date< MONTHS_BETWEEN(SYSDATE,-24)
    2   Table5     archive_table5       changed_date< MONTHS_BETWEEN(SYSDATE,-24)
    2   Table6     archive_table6    received_date< MONTHS_BETWEEN(SYSDATE,-24)
    3   Table7     archive_table7       send_date< MONTHS_BETWEEN(SYSDATE,-24)
    3   Table8     archive_table8       exact_date< MONTHS_BETWEEN(SYSDATE,-24)I want to pass ID from the JOB then the procedure should execute for all the tables with respective ID.
    this is my job
    DECLARE
      X NUMBER;
    BEGIN
      SYS.DBMS_JOB.SUBMIT
      ( job       => X
       ,what      => 'APPS.myprocedure(1);'
       ,next_date => to_date('24/12/2012 00:00:00','dd/mm/yyyy hh24:mi:ss')
       ,interval  => 'TRUNC(SYSDATE+1)'
       ,no_parse  => FALSE
      SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    For example if I pass the ID as '1' through job,then the procedure should execute for
    1   Table1     archive_table1       created_date< MONTHS_BETWEEN(SYSDATE,-24)
    1   Table2     archive_table2    Accepted_date< MONTHS_BETWEEN(SYSDATE,-24)
    1   Table3     archive_table3    last_proposal_date< MONTHS_BETWEEN(SYSDATE,-24)
    INSERT INTO archive_table1
    (SELECT * FROM Table1 WHERE created_date< MONTHS_BETWEEN(SYSDATE,-24));
    DELETE FROM Table1 WHERE created_date< MONTHS_BETWEEN(SYSDATE,-24));
    INSERT INTO archive_table2
    (SELECT * FROM Table2 WHERE created_date< MONTHS_BETWEEN(SYSDATE,-24));
    DELETE FROM Table2 WHERE created_date< MONTHS_BETWEEN(SYSDATE,-24));
    INSERT INTO archive_table3
    (SELECT * FROM Table3 WHERE created_date< MONTHS_BETWEEN(SYSDATE,-24));
    DELETE FROM Table3 WHERE created_date< MONTHS_BETWEEN(SYSDATE,-24));If I pass ID as 2 through job,then the procedure should execute for respective table names and where conditions.
    I have written the following code but it's not giving expected result.
    CREATE OR REPLACE PROCEDURE myprocedure (P_ID IN NUMBER)
    IS
       CURSOR C IS
          SELECT id, table_name,archive_table_name,where_condition FROM apps_global.control_ram WHERE id=p_id
          ORDER BY id,table_name;
    BEGIN
       FOR I IN C
       LOOP
    EXECUTE IMMEDIATE 'INSERT INTO '|| I.ARCHIVE_TABLE_NAME || '
    (SELECT * FROM '|| I.TABLE_NAME ||' WHERE '||I.WHERE_CONDITION||)';
    EXECUTE IMMEDIATE 'DELETE FROM ' ||I.TABLE_NAME|| ' WHERE '||I.WHERE_CONDITION||' ;
       END LOOP;
    END;
    END myprocedure;Please help me.
    Thanks in advance.

  • Best method for transferring data from one database to another?

    There is an 8i database I have to deal with on a regular basis. Besides being completely outdated and unsupported, in my opinion the database has not been well-maintained--for a table with 25 million records, should ‘select count(*) from table;’ take 5 minutes to run? I don’t really know, but that seems long to me. Many complex queries (most including only tables with less than a million records) take a ridiculously long time to run, to the point that I can’t even run some of them.
    I am not the DBA; I don't have the authority to fiddle with the database (nor would I feel comfortable doing that), and the powers that be will not put effort into improving functionality of this database due to an alleged plan to update/replace it within the next year. However, in the mean time, I still have to get data out of this database on a regular basis.
    I have XE 10g installed on my local machine, and I have set up a database link in it to the 8i database. I have found that I can pull in basic data (simple queries) from the 8i database into tables in my XE database (e.g. create table tbl1 as select data from [email protected]) and then query those tables to get the information I need much, much faster (including creation of the tables). While this option does not allow me to create queries/reports that other people can run, it makes work I’m doing only for myself much faster.
    What I’m wondering is, what is the best way to bring the information I need over to my database? I usually don’t need entire tables, and I can probably identify a number of key tables (or parts of tables) I need. What I’ve been doing up until now is writing CREATE TABLE statements on the fly, but then I end up forgetting what all I’ve done, and each time I want up-to-date data, I have to drop the tables and re-create them. It seems to me that there should be an easier way to do this than to copy and paste from a text document into SQL*Plus.
    Does anyone have any suggestions for me on how best to do this?

    Sorry, I guess I posted this in the wrong forum. I re-posted in the database-general forum.

  • Help transferring data from one computer to another

    My aunt uses Palm Desktop as her calendar but does not have a palm pda or phone.
    Her computer at home recently died but she was able to get the palm installation folder from the old hard drive.
    She has Palm Desktop installed at work but the information in it is totally different than what she had at home.  She wants to import the data from her home installation into the installation she has at work.
    It used to be really easy to transfer settings from one Palm installation to another.  Side note: My wife has a Palm Treo 650 and I recently formatted her computer and tried to copy her old installation folder from a backup to the new install directory.  Well, it didn't work like it used to.  I don't know if the software has changed or what.  But, she didn't get everything.  It's been a while, I can't remember if she didn't get ANY of it, or just some.  I remember at one point it only showed her contacts for A-M...N-Z were just plain gone.  Really strange.
    But, back on topic, I tried creating a new user in Palm Desktop and then copy the files under her old username folder to the new username folder in the Palm install directory.  But, Palm Desktop doesn't show anything for the new username.
    How should I go about doing this for her?
    Thanks!
    Post relates to: Treo 650 (Alltel)

    The user on her home install was also Trisha.  So, I created a new user on the work computer, "Trisha2".  Then I closed Palm and copied the contents of her backed-up Trisha user folder from home into the new Trisha2 folder on the work install.  Then I started Palm and flipped to the Trisha2 user.  Nothing showed up.  So, I've pretty much done the exact process from the link already.  Which is exactly the way I thought it should work and have had it work in the past.
    I'll try it again without using numbers in the username and see what happens.
    Thanks!
    Post relates to: Treo 650 (Alltel)

  • Insert data from one form to another table

    I have a form which of course insert data into table1, i created a process within this form and include a sql statement to achieve this for me. My thoughts are this will take whatever is the value from the form and insert it into table2.
    INSERT INTO ML_LIST (ML_TITLE,ML_LASTNAME)
    VALUES
    (P20_SSR_TITLE, P20_SSR_LASTNAME);
    My error is column not allowed here
    Any suggestions

    I used the following
    Begin
    INSERT INTO ML_LIST (ML_TITLE,ML_LASTNAME)
    VALUES
    (:P20_SSR_TITLE,:P20_SSR_LASTNAME);
    End;

  • Transfering data from one account to another

    I just discovered that the user files from the second account on my iMac g5 have somehow transfered into the trash of my first account( which is my main one).I was getting in the second account the following dropdown message- " the home folder is not accessed in the usual place"- and was unable to use it.Can someone please tell me how I can transfer the user files back , thanks

    if you are suggesting I drop the User folder i have in trash into my USer folder in the Hard disc surely it will stay in my first account
    No definitely not in your Users folder, but the Folder called Users, which also has all the other shortnames in it.
    This one in the Trash isn't called Users is it? If so open it up & just look for the other shortname folder, move that.

  • Transferring data from one mac to another

    I recently bought a second hand mac from ebay and it was pretty empty. There are some settings still from the previous user.
    My old mac's backlight has died and the only way to use it is to link it up to my tv.
    I have tried using the Migration assistant via WI-FI and ethernet cable and both haven't worked.
    I'm considering taking the hard drive out of the mac and using it as an external hard drive. There are a couple of programs i've tried to download but dont work and i'd really like my firefox settings back!
    I was also wondering if i was able to take the RAM from the old mac and install it in the new mac?
    All suggestions welcome.

    The model 5,1 is the Aluminum Unibody and doesn't have a FireWire port which would be the easiest way to transfer.
    To transfer your current hard drive I like the free application Carbon Copy Cloner. It makes a bootable copy of everything on your hard drive http://www.bombich.com/index.html You'll need a cheap SATA external hard drive case. Put the new drive in the case then format and partition the new drive and clone your old drive to the new one. Check that it's set up right by booting up from the external drive. Then replace your old hard drive with the new one and put your old one in the external case.
    Here's a cheap SATA external hard drive case on Amazon. http://www.amazon.com/SATA-Hard-Drive-Case-Enclosure/dp/B001AAVA08/ref=pd_cp_e_0
    You can't take the RAM from the 3,1 and put it in the 5,1. The model 3,1 (Late 2007) uses 200 pin 667mhz PC2-5300 RAM and the model 5,1 (Late 2008, Aluminum Unibody) uses 204 pin 1066mhz PC3-8500 RAM
    However RAM is cheap for the 5,1 http://eshop.macsales.com/shop/memory/Apple_MacBook_MacBook_Pro/Upgrade/DDR3

  • Transferring data from one phone to another

    I have a Nokia 6101 with a O2 pay as you go sim in it, I can't find where to change over all info onto my sim card.  I want to put the sim & info into my Nokia 2720fold to use as my English phone, ( I live in Spain ) Don't make the answer to difficult as I'm a pensioner! I have tried to get onto Nokia Suite with my cable CA-42 but it doesn't recognise it! Can you help me please. 

    You may try the Nokia PC Suite from here ..
    First connect Nokia 6101 and Back-up data.. Then connect Nokia 2720 Fold and Restore ..

  • Transferring data from one iPad to another?

    I realize that there's an easy way to do this, for most users. http://www.imore.com/daily-tip-transfer-data-ipad-2  But I have a problem.
    I realize that the iPad will transfer all my applications and paid documents by using the iTunes Backup feature. But what about items I haven't purchased, like self-authored PDFs and videos?

    You can backup your old iPad either to iCloud or iTunes, and then resotre that backup to the new iPad.
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766

  • Transfer data from one DATASET to another DATASET

    Hi,
      Is there a way to transfer the data from one DATASET to another DATASET?
      I tried the following
      OPEN DATASET  DS1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT .
      OPEN DATASET  DS2 FOR INPUT IN TEXT MODE ENCODING DEFAULT .
      TRANSFER DS2 to DS1.
      CLOSE DATASET DS1.
      CLOSE DATASET DS2.
      But it does not work.
      Thanks in advance.

    Hi Jason,
    This logic transfers data from one dataset to another....Kindly check..
    DATA fname(60) VALUE 'myfile'.
    DATA fname2(60) VALUE 'myfile1'.
    TYPES: BEGIN OF line,
             col1 TYPE i,
             col2 TYPE i,
           END OF line.
    TYPES  itab TYPE line OCCURS 10.
    DATA: lin TYPE line,
          tab TYPE itab.
    DO 5 TIMES.
      lin-col1 = sy-index.
      lin-col2 = sy-index ** 2.
      APPEND lin TO tab.
    ENDDO.
    "writing data to file fname.
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    LOOP AT tab INTO lin.
      TRANSFER lin TO fname.
    ENDLOOP.
    CLOSE DATASET fname.
    "reading data from fname and writing to fname1.
    OPEN DATASET fname2 FOR OUTPUT IN BINARY MODE.
    OPEN DATASET fname FOR INPUT IN BINARY MODE.
    DO.
      READ DATASET fname INTO lin.
      IF sy-subrc <> 0.
        EXIT.
      ELSE.
        TRANSFER lin TO fname2.
      ENDIF.
    ENDDO.
    CLOSE DATASET fname.
    CLOSE DATASET fname2.
    "displaying data from fname2.
    OPEN DATASET fname2 FOR INPUT IN BINARY MODE.
    CLEAR lin.
    DO.
      READ DATASET fname2 INTO lin.
      IF sy-subrc NE 0.
        EXIT.
      ENDIF.
      WRITE:/ lin-col1, lin-col2.
    ENDDO.
    CLOSE DATASET fname2.
    Mdi.Deeba
    Edited by: Mdi.Deeba on Feb 17, 2009 8:11 AM

  • How can I Move data from one column to another in my access table?

    I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
    I understand how to drop a column or add a column, how do I transfer data from one column to another.
    Here is my trial code:
    <cfquery name="qQueryChangeColumnName" datasource="#dsn#">
      ALTER TABLE leaderboard
      UPDATE leaderboard SET  points2 = points3
    </cfquery>
    Unfortunately, I get the following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
    How can I transfer my data with the alter table method?

    I looked up the Access SQL reference (which is probably a
    good place to start when having issues with Access SQL), and
    it suggests you probably need a WHERE clause in there.
    I agree the documentation is a good place to start. But you should not need a WHERE clause here.
    Too few parameters. Expected 1.
    If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message..

Maybe you are looking for

  • Restirct by customer in xdo1

    Hi, I have a requirement whereby a sap user who is assigned to Sales organization A needs to access a particular customer from sales organization B. However the sap user has no access to sales organization B. However the requirement is such that the

  • Migrating Certificate Services to Server 2012 in a 2008 R2 AD Domain

    We have a Windows 2008 R2 SP1 Active Directory domain. Our Enterprise Certificate server is running on Windows 2003 R2. We'd like to introduce a Windows 2012 server into our existing domain and migrate the Certificate Services to that new box. Are th

  • Indirect Materials  process in BOM and Production

    Hi Experts, I just have a question regarding SAP B1 process in Production. Let say I have an item we call it indirect material, then in BOM this indirect material is not included but in Production order the cost of this indirect material should be in

  • How do I re install adobe elements 12?

    How do I re install adobe elements 12?

  • Billing type in STO

    Hi Can any one tell me how the billing type is determined in Inter company Stock transport order. Thanks MP


HashFlare