Import data from few tables and export into the same tables on different db

I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
to the same tables. how can i do the import?
Its urgent can anyone please help me do this?
Thanks.

Hello Junior DBA,
maybe try it with the "copy command".
http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
Have a look at the section "Understanding COPY Command Syntax".
Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
Stefan

Similar Messages

  • Reading Data from Unix file and write into an Internal table

    Dear all,
                     I am having an requirement of reading data from unix file and write the same into an internal table..how to do that ...experts please help me in this regard.

    Hi,
    do like this
    PARAMETERS: p_unix LIKE rlgrap-filename OBLIGATORY.
    DATA: v_buffer(2047) TYPE c.
    DATA: BEGIN OF i_buffer OCCURS 0,
            line(2047) TYPE c,
    END OF i_buffer.
    * Open the unix file..
    OPEN DATASET p_unix FOR INPUT IN TEXT MODE.
    <b>IF sy-subrc NE 0.
    *** Error Message "Unable to open file.
    ELSE.</b>
       DO.
         CLEAR: v_buffer.
         READ DATASET p_unix INTO v_buffer.
         IF sy-subrc NE 0.
            EXIT.
         ENDIF.
         MOVE v_buffer TO i_buffer.
         APPEND i_buffer.
      ENDDO.
    ENDIF.
    CLOSE DATASET p_unix.
    <b>Reward points if it helps,</b>
    Satish

  • Pull the data from Azure sql and load into the on premises data base

    Hi friends,
    I have small requirement here, I have to pull the data from Azure sql and load it to the on premises data base.
    I am using Azure sync process to do that, but it will take so much time to do that..
    I know that azure have some limitations, is there any other way to do this..
    Please help me on this...

    Hello,
    Check the program...
    SAPBC480_DEMO.
    Check the below threads
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88e7ea34-0501-0010-95b0-ed14cfbeb85a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bfbcd790-0201-0010-679d-e36a3c6b89fa
    Thanks
    Seshu

  • How to read the data from excel file and store into the table?

    Hi All,
    I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
    All the excel fields and my table columns are same.
    Can you share with me how can acheive this using LOB's?
    Thanks

    Hi OraSuirya,
    you can try with external tables .
    syntax as follows
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    For this you need to create directory
    Directory Creation syntax:
    create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
    grant read, write on directory ext_dir to <User>;
    please paste the excel file in the particular directory .
    I hope this will help you.
    Please correct me if I am wrong anywhere .
    Thanks,
    Tippu.

  • Data from 2 database blocks insert into the same base table?

    Hello,
    I have canvas C_NEW. On this canvas, items from 3 blocks are usable by the user.
    1. Block NEW_HEAD: 3 items say X1,X2,X3
    2. Block NEW : multi record text fields say Y1 thru Y10. Also a scrollbar.
    3. Block NEW_ACTION: 6 buttons say B1 thru B6 (One of them is N_OK which is the item in question)
    both the blocks NEW, NEW_HEAD are db blocks and have the same base table say BT. When the users click on the N_OK (after filling out the data in the NEW_HEAD block and then NEW in that order) I need the data from both the NEW, NEW_HEAD to go into the BT. Currently only the data from the NEW is going into BT. Fields in the BT table which correspond to the fields X1,X2,X3 in the NEW_HEAD remain null after clicking the N_OK button. I put commit_form in the N_OK code since both the blocks are db blocks( and as suggested by folks, it is easier to issue a commit_form than do a lot more work in writing my own SQL).
    How can I achive this?
    Thanks,
    Chiru

    I tried doing what you suggested by putting the following code in the program unit which gets called when_button_pressed.
    PROCEDURE P_SAVE IS
    v_lc_no number;
    v_lc_seq number;
    v_dmg_allow number;
    BEGIN
      Go_Block('B_new_head');
      v_lc_no:= :B_new_head.N_LC_NO;
      v_lc_seq:= :B_new_head.N_LC_SEQ;
      v_dmg_allow:= :B_new_head.N_LC_DMG_ALLOW;
      Go_Block('B_new');      
    FIRST_RECORD;
    LOOP     
         emessage('before insert'||v_lc_no||'-'||v_lc_seq||'-'||:B_new.order_no);
      INSERT INTO ct_lc_import(
        LC_NUMBER,
        LC_SEQ,
        DAMAGE_ALLOWANCE,
        ORDER_NO,
        QTY_SHIPPED,
        UNIT_PRICE,
        DRAFT_AMOUNT,
        TICKET_DEDUCTION,
        SHIPMENT_PENALTY,
        TOTAL_DEBIT,
        DEBIT_DATE)
        VALUES (v_lc_no,
                v_lc_seq,
                v_dmg_allow,
                :B_new.order_no,
                :B_new.qty_shipped,
                :B_new.unit_price,
                :B_new.draft_amount,
                :B_new.ticket_deduction,
                :B_new.shipment_penalty,
                :B_new.total_debit,
                :B_new.debit_date);
       commit;
      NEXT_RECORD;
       if :SYSTEM.LAST_RECORD='TRUE' then
             emessage('last record');
             EXIT;
       end if;
      --NEXT_RECORD;
    END LOOP;
    EXCEPTION
       when FORM_TRIGGER_FAILURE then
          raise;
       when OTHERS then
          emessage(SQLERRM);
          raise FORM_TRIGGER_FAILURE;
    END;But I can't see the records in the table eventhough the message pops up with the values before inserting the 1st record. It then exits. I would think it would atleast insert the very first record into the the table at the least.
    Thanks,
    Chiru

  • How to read the data from XML file and insert into oracle DB

    Hi All,
    I have below require ment.
    I will receive data in the XML file. then i need to read that data and insert into oracle tables. please let me know how this can be handled.
    Many Thanks.

    Sounds a lot like this question, only with less details.
    how to read data from XML  variable and insert into table variable
    We can only help if you provide us details to help as we cannot see what you are doing and only know what you tell us.  Plenty of examples abound on the forums that cover the topics you seek as well.

  • Getting data from some source and insert into corresponding source

    hi all,
    i am using db10g.
    i have like like
    MMA : add1:add2:add3'the above said is the format and actual data will be something like
    MMA : bank street : no:32 : tel: +9127546663
    add1 = bank street
    add2 = no:32
    add3 = tel: +9127546663 my requirement to store add1,add2 and add3 into the table.
    So to take the data i am using substring and instring function to get the data with respect to : my problem is for example in add2 place no:32 is there my task is to fetch the no:32 from that line and store into the table as no:32 only in that case i cannot fetch the value in terms of :.
    sincr : is the delimiter(seperator for data element)
    how can i solve this issue?
    Thanks..
    Edited by: user13329002 on Jan 1, 2011 11:37 PM

    Your first addr1 is terminated by (:).
    your second addr2 is started with (no:), and also terminated by (:)
    and third addr3 is started with (tel:).
    only the first and third (:) will be used as delimiter, so how about this?
    WITH T AS (SELECT 'bank street:no:32:tel:+9127546663' AS STR FROM DUAL)
    SELECT SUBSTR(STR, 1, INSTR(STR, ':', 1, 1)-1) AS ADD1,
    SUBSTR(STR, INSTR(STR, ':', 1, 1)+1, INSTR(STR, ':', 1, 3)-INSTR(STR, ':', 1, 1)-1) AS ADD2,
    substr(str, instr(str, ':', -1, 2)+1) as add3 from t;
    bank street       no:32     tel:+9127546663Or can`t you just ask the people who gave the requirement to change the delimiter used in the format to something else like pipe (|)?

  • Hi, extract data from xml file and insert into another exiting xml file

    i am searching code to extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    1st xml file which has two lines(text1.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xs:PrintDataRequest xmlns:xs="http://com.unisys.com/Anid"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    <xs:Person>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    These two lines has to be inserted in the existing another xml(text 2.xml) file(at line 3 and 4)
    Regards,
    bubbly

    Jadz_Core wrote:
    RandomAccessFile? If you know where you want to insert it.Are you sure about this? If using this, the receiving file would have to have bytes inserted that exactly match the number of bytes replaced. I'm thinking that you'll likely have to stream through the second XML with a SAX parser and copy information (or insert new information) as you stream with an XML writer of some sort.

  • Extract data from xml file and insert into another exiting xml fil

    hello,
    i am searching extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    Regards,
    Zhuozhi

    If the files are small, you can load the target file in a DOM document, insert the data from the source file and persist the DOM.
    If the files are large, you probably want to use a StAX or SAX.

  • Import data from excel file - best practice in the CQ?

    Hi,
    I have question related to importing data from excel file and creates from those data a table in the CQ page. Is inside CQ some OOTB component which provides this kind of functionalities? Maybe somebody implement this kind of functionality or there is best practice to do this kind of functionalities?
    Thanks in advance for any answer,
    Regards
    kasq

    You can check a working example package [1] (use your Adobe ID to log in)
    After installing it, go to [2] for immediate example.
    Unfortunately it only supports the old OLE-2 Excel format (.xls and not .xlsx)
    [1] - http://dev.day.com/content/packageshare/packages/public/day/cq540/demo/xlstable.html
    [2] - http://localhost:4502/cf#/content/geometrixx/en/company/news/pressreleases/my_personal_bes ts.html

  • HT201328 Can I unlock an old, unused iPhone 3GS (to be used overseas with a local simcard) and upload on it data from a newer iPhone 4 on the same MacBook Pro?

    Can I unlock an old, unused iPhone 3GS (to be used overseas with a local simcard) and upload on it data from a newer iPhone 4 on the same MacBook Pro?

    I got approval to unlock my 3GS from AT&T and in the process of updating the operating system. I am now using a iPhone 4 on my computer. I just want to know the following:
    When I backup and restore the 3GS in order to unlock it, will it mess up my existing data backed up from my iPhone 4?
    Can I upload data from my newer iPhone 4 onto my 3GS?

  • Can two Apple IDs be linked so that they can share data? My iMac and iPad have the same Apple ID and sync contacts, bookmarks, etc. My wife's iPad has a different Apple ID. Can it be linked somehow to mine to share contacts etc?

    Can two Apple IDs be linked so that they can share data? My iMac and iPad have the same Apple ID and sync contacts, bookmarks, etc. My wife's iPad has a different Apple ID. Can it be linked somehow to mine to share contacts etc?

    No. You cannot link your contacts to hers. However, you can use Home Sharing to share the information:
    Understanding Home Sharing
    iOS- Setting up Home Sharing on your iOS device
    Setting up Home Sharing for Apple TV (2nd & 3rd generation)
    iTunes- Setting up Home Sharing on your computer

  • How to read the data file and write into the same file without a temp table

    Hi,
    I have a requirement as below:
    We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined.
    This is a 10.7 to 11.10 migration. In 10.7 the users are using a custom table into which they are first loading the raw data and writing a pl/sql validation on that and loading it into a new flat file and then running the lockbox process.
    But in 11.10 we want to restrict using temp table how can we achieve this.
    Can we read the file first and then do validations accordingly and then write to the same file and process the lockbox.
    Any inputs are highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hello Gurus,
    Let me tell you about my requirement clearly with an example.
    Problem:
    i am receiving a dat file from bank in below format
    105A371273020563007 07030415509174REF3178503 001367423860020015E129045
    in this detail 1 record starting from 38th character to next 15 characters is merchant reference number
    REF3178503 --- REF denotes it as Sales Order
    ACC denotes it as Customer No
    INV denotes it as Transaction Number
    based on this 15 characters......my validation comes.
    If i see REF i need to pick that complete record and then fill that record with the SO details as per my system and then submit the file for lockbox processing.
    In 10.7 they created a temporary table into which they are loading the data using a control file....once the data is loaded into the temporary table then they are doing a validation and updating the record exactly as required and then creating one another file and then submitting the file for lockbox processing.
    Where as in 11.10 they want to bypass these temporary tables and writing it into a different file.
    Can this be handled by writing a pl/sql procedure ??
    My findings:
    May be i am wrong.......but i think .......if we first get the data into ar_payments_interface_all table and then do the validations and then complete the lockbox process may help.
    Any suggestions from Oracle GURUS is highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

  • Import data from a Fixed Length File into Oracle database

    Hi,
    I would like to import data from a Fixed Length text file into a table using HTML DB application.
    As of now, i have a .sql file(that uses external table) to import the data into Oracle tables
    I would like to integrate this in my HTML DB application so that the user can directly import the data into the table.
    Sample data
    XXXYYYYZZZZZ
    Data should be read to table that has
    Col1 Col2 Col3
    XXX YYYY ZZZZZ

    Hi,
    I would like to import data from a Fixed Length text
    file into a table using HTML DB application.AFAIK, fixed length imports are not something you can do directly with the HTML DB tools or available APIs.
    As of now, i have a .sql file(that uses external
    table) to import the data into Oracle tables
    I would like to integrate this in my HTML DB
    application so that the user can directly import the
    data into the table.Any fixed-length data needs to have a specification associated with it that indicates which character position begins a new column and what each column represents. Some also include what datatype should be used for each of those.
    If you really want to do this I would suggest that you create a table that you can store the file spec in. It would probably have columns for field name, start position, length or end position, datatype and any alias/column name you might want to apply. You would then use this table in a PL/SQL procedure (probably a package with the main processing procedure and various supporting procedures/functions) to read the file into memory, apply the file spec to each line and then do inserts into your table.
    Obviously, this is just a concept or strategy. Implementing it will depend on your PL/SQL skills and determination. If you want to pursue this strategy I'm sure you can find some jump-starts by doing a search on the PL/SQL forum.
    This may not sound like an answer - but the answer is you need to code it to fit your requirements. Hope that helps.
    Earl

  • Reading data From XML file and setting into ViewObject to Pouplate ADF UI

    Hi,
    I have following requirement.
    I would like to read data from XML file and populate the data in ViewObject so that the data can be displayed in the ADF UI.
    Also when user modifies the data in the ADF UI, it should be modified back into to ViewObject.
    Here is an example - XML file contains Book Title and Author. I would like to read Book Title and Author from XML file and set it into ViewObject Attribute and then display Book title and Author in ADF UI page. Also when user modifies Book title and Author, I would like to store it back in View Object.
    Please help me with this requirement and let me know if any solution exist in ADF, for populating the ADF UI screen fields with external XML file data.
    Thanks

    Read chapter 42 http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm of the fusion developer guide
    Section 42.7, "Reading and Writing XML"
    Section 42.8, "Using Programmatic View Objects for Alternative Data Sources"
    Timo

Maybe you are looking for