Copying data from one table to another table thru java

Hi
I have to copy data from table emp in Database A to table emp in Database B. My input would be table name and number of rows to be fetched. these rows i need to insert in table B.
The problem over here is I won't be having any info. of table emp i.e the number of columns it has and their type.
So is their any way i can copy the data from one table to other without having the info abt the number of cols and their type.
TIA

Cross post - http://forum.java.sun.com/thread.jspa?threadID=5169293&messageID=9649839#9649839

Similar Messages

  • What are the diffrent ways to copy data from one application to another?

    Hi,
    Can you guys tell me what are the different ways to copy data from one application to another application??
    I know we can do it through script logic using DESTINATION_APP.
    Is there any other way to copy data from one application to another application?
    Please help me
    Thanks,
    Charly

    You can also call a custom DTSX package in SSIS via the datamanager.
    there are at least 5 ways of transfering data in BPC between apps.
    1. Through the front end (excel etc) via evdre/evsnds
    2. Through Script logic using *Dest App
    3. Using BPC's standard export dtsx package via DM
    4. Using SSIS using BPC's custom SSIS tasks
    5. Through Script logic using stored procs.
    i am sure people will come up with more.
    remember if you use ssis and move data into any table but the wb, you need to process the cube afterwards.

  • Copy data from one schema to another schema tables

    Hi,
    I was doing a copy using sql developer copy feature, data copy worked perfect but for few table data didn't move there are about 30 tables from schema prod to schema dev i need to move tables are already created only data needs to be moved from prod to dev
    Can you suggest me any method were I can move all the tables data at a time from one schema to another. Please suggest.
    Thanks
    Sudhir

    Hi,
    If table structure is the same then:
    insert into dev.table_name
    select
    from
      prod.table_name  --if prod is in another database change to prod.table_name@db_link_to_prod_db
    commit
    ;Hope this helps. Otherwise give some more info about where these schema's are.
    Regards,
    Peter

  • How to copy data from one BB to another via Desktop Manager

    I've got two BBs (8900 and 9300), both actively in use and with different data (contacts, memos, etc.) on them.
    I need to copy my tasks, memos and contacts from 8900 to 9300. I tried "switch phones" option, but it substitutes data, while I need to syncronize it, so that data from 8900 is added to what is currently is on the 9300. 
    Is it possible to do it via Desktop Manager? It seems there was somewhere an option "copy data from another BB", but I can't find it in the latest Desktop Manager version.

    You would need to use Desktop Mangaer to sync BB1 with a local PIM program (such as Outlook or Lotus Notes) to get the information off BB1. Then use Desktop Manager to sync BB2 with the same PIM program. 

  • XML script to copy data from one repository to another

    Hi all,
    a customer wants an xml script that copy all data from the repository A to the repository B. I think that this is not possible to do this with an xml script, because the script tags (add-item, update-item, query-item, import-item, load-item, remove-item) seems don't give this feature. The same for RQL, that doesn't give you a command like "SELECT INTO".
    But what i'm asking is: Is there a way to run the copy using the repository script tags?
    Thanks.
    Edited by: user10980894 on 11-lug-2011 3.33

    Please elaborate , If what you need is to copy data from between two dissimliar repositories then it is not possible , but if a and b are having the same structure then you might be able to do that using the following and tweaking the generated xml
    Both the repositories should have the same structure and name , please follow the below commands and you will be able to export the data in below format , see if this is all you want
    export using
    bin/startSQLReository -m module -export all outputfile.xml -repository repositoryA
    Change the reference to repositoryA in the file
    import using
    bin/startSQLRepository - m module - import outputfile.xml -repository repositoryB
    <add-item item-descriptor="priceList" id="plist4350003">
    <set-property name="description"><![CDATA[Group of Thirteen States which is generally called as L13 in AT&T]]></set-property>
    <set-property name="displayName"><![CDATA[L13]]></set-property>
    <!-- export is false <set-property name="version"><![CDATA[7]]></set-property> -->
    <set-property name="basePriceList"><![CDATA[listPrices]]></set-property>
    <set-property name="creationDate"><![CDATA[9/3/2010 07:38:49]]></set-property>
    <set-property name="lastModifiedDate"><![CDATA[9/10/2010 17:02:09]]></set-property>
    <set-property name="itemAcl"><![CDATA[Admin$role$administrators-group:list,write,write_owner,write_acl,read_owner,destroy,read_acl,read;Admin$role$everyone-group:list,read]]></set-property>
    </add-item>
    please refer to this section of ATG Repository guide for further info

  • Copying data from one HD to another problem

    No matter what data I try to copy from one of my Firewire HDs to another I get this error message: The Finder cannot complete the operation because some data in ".DS_Store" could not be read or written. (Error code -36)
    Any ideas??
    thanks,
    burger

    burger-
    Is this from one particular drive to another, or from any of the drives to any other of the drives? Are these FW400 or 800 drives or a combination?
    If it is one drive that should make it easy to find the culprit. If it isn't, then you may want to try repairing permissions on all of the drives including your boot drive.
    "DS_Store" I have seen before but I just can't seem to remember where or why. I will keep the gears turning.
    Luck-
    -DaddyPaycheck

  • Copy data from one sheet to another based on content of popup menu

    I'm trying to create a spreadsheet to help teachers grade students during reading time in my school.  If you're interested in the specifics of it, the long version is in the following paragraph:
    I work in a high school, and 10% of each student's English class grade is supposed to come from reading during what is called "Enrichment time," a 20-minute daily reading time.  This occurs at the beginning of the second period of the school day.  With a few rare exceptions, students are not in their English teacher's class for this reading time; their 2nd period teacher, whether a teacher of math, science, English, or history, or whatever, records a daily grade for each student, based on whether or not the student is reading during enrichment time. In the past, teachers have recorded the grade of each student on a separate sheet of paper, then gone to the teachers' lounge and sorted through their students' grade sheets, putting each student's sheet into a folder for the student's English teacher to grade. Next year every teacher will have an iPad, so I'm trying to create a cloud-shared numbers spreadsheet that could help solve the problem of teachers not communicating well.  I've settled upon the solution of giving each teacher with a 2nd period Enrichment group access to a spreadsheet that would be accessible to all the English teachers as well.  The enrichment teacher would enter the students' names on teh far left hand side, then with each student's name the teacher's name would be indicated in a popup menu.  The first sheet is where the 2nd period enrichment teacher would enter the data, and then the different English teachers would, ideally, have a separate sheet with only their students populating that sheet. 
    tl;dr:
    I need sheet 2 to be populated with whole rows of data from sheet 1, and I want sheet 2 to only include rows which have a specific choice selected in a popup menu.
    Here's the document, via iCloud:
    https://www.icloud.com/iw/#numbers/BAL2c7eirUmlW1C8CvqB7F6X9LlhwHB3bHWF/Enrichme nt_Template

    A,
    It seems that your iCloud Numbers document is protected by password.
    Jerry

  • How to copy data from one node to another or fromone table to another table

    Hi,
    I have a two tables.I am populating data in first table and on the click of first table ,selected row data should be copied to the second table.
    How do i achieve this requirement and what should be the cardinality of the second table
    Thanks
    Bala Duvvuri

    Hi,
    For this u have to fetch the selected row.
    For fetching the selected row go to the events of first table and select "OnLeadselect".
    Create a new method for this.
    Now in this method read the value of the selected row with method get_static_attributes.
    with this u will have the selected row in the element.
    not just bind this elemnt with the second table.
    Second node will also have the cardinality 0:n, because this is also binded with the table.
    Coding part for this is as below:
    method ONACTIONSELECT .
        DATA lo_nd_cn_mara TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_mara TYPE REF TO if_wd_context_element.
        DATA ls_cn_mara TYPE wd_this->element_cn_mara.
        DATA ls_cn_mara1 TYPE wd_this->elements_cn_mara.
      navigate from <CONTEXT> to <CN_MARA> via lead selection
        lo_nd_cn_mara = wd_context->get_child_node( name = wd_this->wdctx_cn_mara ).
      @TODO handle not set lead selection
        IF lo_nd_cn_mara IS INITIAL.
        ENDIF.
      get element via lead selection
        lo_el_cn_mara = lo_nd_cn_mara->get_element(  ).
      @TODO handle not set lead selection
        IF lo_el_cn_mara IS INITIAL.
        ENDIF.
      alternative access  via index
      lo_el_cn_mara = lo_nd_cn_mara->get_element( index = 1 ).
      @TODO handle non existant child
      IF lo_el_cn_mara IS INITIAL.
      ENDIF.
      get all declared attributes
        lo_el_cn_mara->get_static_attributes(
          IMPORTING
            static_attributes = ls_cn_mara ).       " here u are getting the selected row of the table.
    APPEND ls_cn_mara to ls_cn_mara1.      " append the row in the table so that can be binded with the second node
      DATA lo_nd_cn_maraout TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_maraout TYPE REF TO if_wd_context_element.
      DATA ls_cn_maraout TYPE wd_this->element_cn_maraout.
    navigate from <CONTEXT> to <CN_MARAOUT> via lead selection
      lo_nd_cn_maraout = wd_context->get_child_node( name = wd_this->wdctx_cn_maraout ).
    Bind the table with the second node
    lo_nd_cn_maraout->bind_table( ls_cn_mara1 ).
    endmethod.
    ->cn_mara  is the first node.
    ->cn_mara1  is the second node
    Thanks,
    Pankaj Aggarwal
    Edited by: Pankaj Aggarwal on Nov 19, 2008 7:40 AM

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

  • Copy data from one application to another in the same application set

    Hello everyone
    i hope you are all fit and fine
    i have a little question
    i have my source application with accounts
    and in my destination application, some accounts are like AppSource.Account1+AppSource.Account2 etc...
    when i write the logic
    i have to rename the dimensions both applications have in common
    use the instruction *skip_dim for the dimensions which are in the source application but not in the destination one
    and use instruction  *add_dim for the dimensions available in the destination app and not in the source app
    is that right?
    and can i write *add_dim dimension_name=all or do i have to precise a base level member
    and after that i wan simply use instructions like
    when AppSource.Account
    is Account 1, account 2
    rec (appDestination.Account)
    is my procedure correct please especially the syntax of *add_dim dimname=all?
    thanks a lot folks
    take care

    Hi Clarie,
    Your understanding is correct, except that you need to give precise baselevel member in *add_dim as you can not write data to parent member and regarding
    AppSource.Account1+AppSource.Account2
    This logic will work,
    *destination_app = appDestination
    //list add_dim,skip_dim,*rename_dim
    //assuming name of account dimension in source app is account
    *when account
    *is account1,account2
    rec(acct=account3)
    //acct is name of account dimension in destination application
    //where account3 is the member of destination application account dimension to which sum of account1 and account2 are to be written
    Hope this helps,
    Kranthi

  • Copying data from one field to another on a form

    Hi
    I have created a form called application which contains the following fields:
    Name
    Address1
    Address2
    Address3
    Address4
    Location1
    Location2
    Location3
    Location4
    When the user has entered his name and address I would like the data to then prefill into the location lines.
    I think you can do this sort of thing in java event handlers but I have no experience of this.
    Any one got any ideas how I can do this.
    Thanks
    Jayne

    hi Jayne,
    The following is an example of something just like what you want.
    In this form, get_add1Vals(); is called in the js-event handler for the field NEWFNAME1 which gets populated by the value selected or entered into FNAME1. The following code goes in the additional plsql code region (Before displaying the page).
    hope that certainly helps! please update it with your results.
    AMN
    BEGIN
    HTP.PRINT('<SCRIPT LANGUAGE="JavaScript1.1">
             function get_add1Vals{
                var  v_fname;
                for (i=0; i<document.forms[0].elements.length; i++)
                  if (document.forms[0].elements.name=="FORM_TBL_TEST_FORM_3.DEFAULT.FNAME.01")
    v_fname = document.forms[0].elements[i].value;
    break;
    if (document.forms[0].elements[i].name=="FORM_TBL_TEST_FORM_3.DEFAULT.NEWFNAME1.01")
    document.forms[0].elements[i].value = v_fname;
    break;
    void("");
    return true;
    </SCRIPT>');
    EXCEPTION
    When Others THEN
    null;
    END;

  • Copy data from one Table to another Table

    How can I copy data from one Oracle Table to another Oracle Table on a different server? Question 2: How can I clear all of the data in one Table with a single SQL script?
    Thanks...

    Question 1:
    I assume you have the privileges. If you don't, ask the DBA to give them to you. Then
    1. Login to database_source (It could be either the source or the target. Let's assume it's the source.)
    2. Create a database link to database_target: CREATE DATABASE LINK link_to_database_target CONNECT TO myuserid IDENTIFIED BY mypassword USING 'database_target'; Note the single quotes.
    3. Copy the table data: INSERT INTO targetowner.mytable@link_to_database_target SELECT * FROM sourceowner.mytable; COMMIT;
    Question 2:
    You have two options, but you may not have privileges for both.
    Option 1:
    DELETE FROM tableowner.tablename; COMMIT;
    Advantage: Since this is a DML (Data Manipulation Language) statement, you have to commit the transaction. Also, the data will be gone but the table size is NOT changed, so it's ready for accepting replacement data. DML statements can simply be executed not only from SQL scripts, but from PL/SQL scripts as well.
    Disadvantage: Slow, because all record deletion is logged, so you can recover from it by issuing a ROLLBACK; instead of the COMMIT; above. The table size is NOT changed, so if you are short of disk space or tablespace space, you have not resolved the issue.
    Option 2:
    TRUNCATE TABLE tableowner.tablename;
    Advantage: Since this is a DDL (Data Definition Language) command, you do NOT have to commit the transaction. (DDL commands automatically commit both before and after their execution.) The table size will be changed back to the initial extent size which is the minimum size a table can have and can only be set when the table is created. If it needs to be changed, the table has to be dropped and recreated with a different initial extent size. The statement execution of this command is not logged, therefore it's much faster then the DELETE.
    Disadvantage: No rollback. Being a DDL, this command cannot be executed straight from PL/SQL. If you need to issue this within PL/SQL, you will have to use dynamic SQL.

  • Copy data from one table to another

    Hello everyone,
    I have a student table with fields sno, sname. I created another table student1 with same fields sno, sname and with one new field class.
    Now i want to copy data from sno, sname of student table to sno, sname of student1 table when the class field in styudent1 has no data i.e., its null.
    Could any one let me know how to do this?
    Thanks,
    Prathima

    i want to copy data from sno, sname of student table to sno, sname
    of student1 table when the class field in styudent1 has no dataSo what is the join condition? What column in STUDENT1 tells us what row in STUDENT to copy?
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • T code to Copy Data from one table to another table

    Hi,
    I want copy all data of one table to its copy table. Anyone knows transaction code to copy data from one table to another table.
    Regards,
    Jigar Thakkar.

    Hi
    Create a small program.
    Extract data from T1 - database table and put it in one internal table - itab1.
    loop the itab1 data .............
        insert itab1 into tab2.   (tab2 - second database table)
    endloop.
    try this....
    hope it works....

  • Table Data From One DataBase to another

    Dear Fellows,
    There are two DataBases running in my NT Server. I want to pull data of a table from other database. Does any body know how can I do it if I dont want to export and then import.
    Thanks in advance
    Danish

    Please find the help for SQL*PLUS command COPY.
    It will be useful when you want to copy datas from one database from another database without using import & export.

  • 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

  • Error :JCO_ERROR_FIELD_NOT_FOUND with JCo3

    Hi Experts, I have created a java application to send a XML to SAP inorder generate an IDOC by using SAP JCo3. But during parsing i am facing an error " Field COSMAS01 not a member of EDI_DC40StackTrace:com.sap.conn.jco.JCoRuntimeException: (127) JCO

  • Subcontracting availibility check on make to order stock

    Dear All, I have a material let's say  'X' which with a BOM/routing which includes a subcontracting step of material "Y" which is a also a make to stock item. When I create a sales order for material X and run a Plannings run I first produce material

  • Firefox opens maximized at random on Mac

    Hello, I'm using FF 30.0 on OS X 10.9.3. I don't like having my FF fill entire screen (maximized) so I dragged the window to a specific size I like. The problem is, once in a while, FF will not respect the last window size it was set to and open maxi

  • Issue with room template before going Live

    We have created a template and all the users get their own room. In couple of months we are planning to add new features to the app. Of course when we update the template, the rooms won't get updated with new nodes. How do we upgrade these existing r

  • No authorization for customers/vendors

    hi all i am getting this error in a new compnay code. please help me No amount authorization for customers/vendors in company code 1100 Message no. F5155 Diagnosis No amount authorization for customer/vendor line items has been specified in company c