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?

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
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)…
    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.
       DEBUG = ON
       WRITE = OFF
       QUERY = ON
    Please find attached result.
    Dipesh Mudras.

    Here is the manual to copy data between apps (it works with BPC NW75):
    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:
    *START_BADI FiltroPD
         WRITE = OFF
         ADD_DIM ="O_COSTE = no_input"
         ADD_DIM="CECO = no_input"

  • 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
    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
      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....

    Have a look at the following article which you may find useful:
      <a href="">Improving performance in nested loops</a>
    good luck, damian

  • Transferring data from one schem to another

    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.
    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
      X NUMBER;
      ( 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));
    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.
       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;
       FOR I IN C
       END LOOP;
    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?
    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.
    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.
    My error is column not allowed here
    Any suggestions

    I used the following

  • 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 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.
    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

  • 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.  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

  • Transfer data from one DATASET to another DATASET

      Is there a way to transfer the data from one DATASET to another DATASET?
      I tried the following
      TRANSFER DS2 to DS1.
      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.
    "writing data to file fname.
    LOOP AT tab INTO lin.
      TRANSFER lin TO fname.
    CLOSE DATASET fname.
    "reading data from fname and writing to fname1.
      READ DATASET fname INTO lin.
      IF sy-subrc <> 0.
        TRANSFER lin TO fname2.
    CLOSE DATASET fname.
    CLOSE DATASET fname2.
    "displaying data from fname2.
    CLEAR lin.
      READ DATASET fname2 INTO lin.
      IF sy-subrc NE 0.
      WRITE:/ lin-col1, lin-col2.
    CLOSE DATASET fname2.
    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
    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