How to import a table from another oracle database ?

Hi all ,
i could like to use pl/sql to import one table from another oracle database server ?
is it possible to do this ?
A server B server
table: test <------------------------> table : newtest
the tns profile already configurated . the connection is ready .
thanks a lot !
Best Regards,
Carlos

if i don't have TEST table on server B whether COPY command will create this table on server B with the same structure ? If you specify CREATE as a clause the table will be created:
SQL> help copy
COPY
COPY copies data from a query to a table in a local or remote
database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
COPY {FROM database | TO database | FROM database TO database}
            APPENDCREATE|INSERT|REPLACE} destination_table
            [(column, column, column, ...)] USING query
where database has the following syntax:
     username[password]@connect_identifier

Similar Messages

  • How to import a table from another database using DB toolset.

    Hello All
    I would like to import a table from one database to another using DB toolbox.
    I do not want to import all data to LV and then save them to another database. Instead I would prefer to use SQL syntax.
    Does anobody know how to write SQL command to import whole table from one database to another?
    I have found in some SQL manual that INSERT INTO should work, but JET4 returns an error that table (e.g. c:\mydatabase\table1) can not be found.
    Thanks in advance
    Pawel

    if i don't have TEST table on server B whether COPY command will create this table on server B with the same structure ? If you specify CREATE as a clause the table will be created:
    SQL> help copy
    COPY
    COPY copies data from a query to a table in a local or remote
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                APPENDCREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[password]@connect_identifier

  • Can i use App schema from another Oracle database.

    Hi everyone,
    can i use application schema from another Oracle database and how can we do this. the reason is that current database where apex is installed is get very slow because of the size of database and application usage.
    Regards,
    Kashif.

    user10485983 wrote:
    Please update your forum profile with a real handle instead of "user10485983".
    can i use application schema from another Oracle database and how can we do this. the reason is that current database where apex is installed is get very slow because of the size of database and application usage.
    You can (using database links), but this will generally result in even poorer performance (unless by "another Oracle database" you mean using RAC?)
    It sounds more like you either need to upgrade your systems, or refactor your applications to have a smaller performance footprint.

  • How to update one table from another

    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?

    Comet wrote:
    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?I am not convinced you have what you think you have
    >
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    When you want to produce a DATE datatype when starting with a string,
    you must use TO_DATE() on the SET line!
    (TO_CHAR(received_date,'RRRR') + 2000)since when do you do add characters (from TO_CHAR) with a constant number (2000)?
    You should NEVER EVER rely on implicit datatype conversion
    Edited by: sb92075 on Jul 27, 2011 7:09 PM

  • OMBPLUS - How to import a table from the database

    I have a table that is out of sync with its database definition. In OWB, I would go to the Tables section and select Import and re-import the file in. How do I script this in OMBPLUS.

    If I do the OMBRETRIVE TABLE 'CUSTOMER' GET COLUMNS then all I get is a list of columns displayed in OMBPLUS. Doing a OMBCOMMIT does not modify the table in the OWB repository. It still does not have the new columns.
    Also, when I import a table from the GUI, I UNCHECK the two advanced options of: 'Preserve repository added constraints' and 'Preserve repository added columns'. I also get to select from the GUI I get to choose how many levels of foreign key constraints to retreive. How do I specify these in the OMBPLUS script as well.

  • How to import a clip from another Imovie movie ?

    I have imported with Imovie HD in two distinct movies some clips that I wish to merge in one larger movie.
    What is the simplest way to merge two movies ?
    What is the simplest way to import just one clip from another movie ?
    Thanks !!!
    Luc

    Well I found where those clips were trashed too. Its not the iMovie trash can as indicated by the help text! Its the user trash can. Here is how I found my clips in case this is useful for anyone else.
    find . -name '*.dv' -exec ls -l {} \; | grep Trash
    -rw-r--r-- 1 aspencer aspencer 105600000 11 Dec 10:53 ./.Trash/Clip 251 copy.dv
    -rw-r--r-- 1 aspencer aspencer 105600000 11 Dec 10:45 ./.Trash/Clip 251.dv
    -rw-r--r-- 1 aspencer aspencer 88560000 11 Dec 10:44 ./.Trash/Clip 252.dv
    -rw-r--r-- 1 aspencer aspencer 91560000 11 Dec 10:45 ./.Trash/Clip 253.dv
    -rw-r--r-- 1 aspencer aspencer 53760000 11 Dec 10:45 ./.Trash/Clip 254.dv
    -rw-r--r-- 1 aspencer aspencer 61320000 11 Dec 10:45 ./.Trash/Clip 255.dv
    -rw-r--r-- 1 aspencer aspencer 179640000 11 Dec 10:46 ./.Trash/Clip 256.dv
    -rw-r--r-- 1 aspencer aspencer 197880000 11 Dec 10:47 ./.Trash/Clip 257.dv
    -rw-r--r-- 1 aspencer aspencer 69960000 11 Dec 10:47 ./.Trash/Clip 258.dv
    -rw-r--r-- 1 aspencer aspencer 48720000 11 Dec 10:47 ./.Trash/Clip 259.dv
    -rw-r--r-- 1 aspencer aspencer 146280000 11 Dec 10:42 ./.Trash/Clip 260.dv
    -rw-r--r-- 1 aspencer aspencer 45120000 11 Dec 10:42 ./.Trash/Clip 261.dv
    -rw-r--r-- 1 aspencer aspencer 78000000 11 Dec 10:42 ./.Trash/Clip 262.dv
    -rw-r--r-- 1 aspencer aspencer 66960000 11 Dec 10:43 ./.Trash/Clip 263.dv
    -rw-r--r-- 1 aspencer aspencer 311280000 11 Dec 10:44 ./.Trash/Clip 264.dv
    -rw-r--r-- 1 aspencer aspencer 104160000 11 Dec 10:44 ./.Trash/Clip 265.dv
    -rw-r--r-- 1 aspencer aspencer 40200000 11 Dec 10:44 ./.Trash/Clip 266.dv
    To see the total space taken up by these files I did:
    find . -name '*.dv' -exec ls -l {} \; | grep Trash | awk 'BEGIN { space = 0}; { space += $5}; END { print "total space",space}'
    total space 1794600000
    So I just have to empty the main trash in order to recover from my first copy/paste effort to move clips from one project to another. BTW is there a way to copy them to the clips pane and not the timeline?
    Alex Spencer

  • How to import  new tables from database

    I have relational source in OWB. I had added a new table in teh database, now I donot know how to import this new table in OWB9i?
    I will appreciate your help.
    Thanks
    Syed

    Mark,
    I am sorry I did not explain the problem clearly. I created module of the relationa source and then using DB link I had imported all the tables from schema A , but my question is that I had created a new table in the Schema A and I want to just import that table in my relation resource module. Is there a way to do it in OWB? How do we create just on etable in OWB module?
    Thanks
    Syed

  • How to update one table from another table?

    Hi,
    Please go through the case I am mentioning below and if possible try to provide with a solution.
    I am working on a report to generate cash flow forecast, where in one of the fields is "Payroll", in which its being mentioned as:
    In the selection screen: I am entering Project ID, profit Center and Period(in MM/YYYY format).
    Selection of all entries in table COSP for selected cost elements above, value type 1, version , all periods and for all selected WBS elements and all objects underneath.
    From this, update table COFP with information from COSP with value type 62 and same period.
    For updation of various fields the following information is being given.
    How should we update COFP?
    New entries per OBJNR/PERIO and HKONT are required via using the information from COSP:
    COFP-MANDT              =          SY-MANDT
    COFP-KOKRS              =          if COSP-OBJNR begins with ‘PR’
                                                   Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PKOKR
                                                    If COSP-OBJNR begins with ‘NV’
                                                   Check table AFVC with COSP-OBJNR = AFVC-OBJNR,
    go to Table AFKO with AFVC-AUFPL,
    go to table AUFK with AFKO-AUFNR and enter AUFK-KOKRS
    If COSP-OBJNR begins with ‘OR’
    Check table AUFK with COSP-OBJNR = AUFK-OBJNR
    and enter AUFK-KOKRS
    COFP-BELNR               =          Check table NRIV, CLIENT = SY-MANDT, OBJECT = RK_BELEG,
    SUBOBJECT = COFP-KOKRS, NRRANGENR = ‘05’,
    Add 1 to NRLEVEL and begin with 500000000
    Use same BELNR for one update-run
    COFP-BUZEI                =          ‘1’ + and 1 in next entry but same update-run
    COFP-TWAER              =          COSP-TWAER
    COFP-ZHLDT                =          always last day of month in field COFP-PERIO
    COFP-GJAHR               =          COSP-GJAHR
    COFP-PERIO               =          if entry in field WKG001 à PERIO = 001
                                                   If entry in field WKG006 à PERIO = 006……
    COFP-WRTTP              =          ‘62’
    COFP-VRGNG              =          ‘FIPL’
    COFP-POSIT                =          Check table SKB1 where SAKNR = COSP-KSTAR and use SKB1-FIPOS
                                                   for going to table FMCI-FIPOS and enter FMCI-POSIT
    COFP-OBJNR               =          COSP-OBJNR
    COFP-HKONT              =          COSP-KSTAR
    COFP-WKGBTR           =          WKGXXX
    COFP-WKGBTRO         =          -
    COFP-WTGBTR            =          WTGXXX
    COFP-WTGBTRO         =          -
    COFP-WOGBTR           =          WTGXXX
    COFP-WOGBTRO        =          -
    COFP-BUKRS1            =          -
    COFP-GJAHR1             =          -
    COFP-BELNR1             =          -
    COFP-BUZEI1              =          -
    COFP-BUKRS2            =          -
    COFP-GJAHR2             =          -
    COFP-BELNR2             =          -
    COFP-BUZEI2              =          -
    COFP-EBELN               =          -
    COFP-EBELP               =          -
    COFP-ZEKKN               =          -
    COFP-ETENRM            =          -
    COFP-STUNR               =          -
    COFP-LIFNR                =          -
    COFP-KUNNR              =          -
    COFP-GSBER              =          -
    COFP-BUKRS              =          (nearly same as COFP-KOKRS!)
                                                   if COSP-OBJNR begins with ‘PR’
                                                   Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PBUKR
                                                    If COSP-OBJNR begins with ‘NV’
                                                   Check table AFVC with COSP-OBJNR = AFVC-OBJNR,
    go to Table AFKO with AFVC-AUFPL,
    go to table AUFK with AFKO-AUFNR and enter AUFK-BUKRS
    If COSP-OBJNR begins with ‘OR’
    Check table AUFK with COSP-OBJNR = AUFK-OBJNR
    and enter AUFK-BUKRS
    COFP-EINDT                =          -
    COFP-SGTXT               =          -
    COFP-GEBER              =          -
    COFP-KURSF              =          -
    COFP-KUFIX                =          -
    COFP-GBETR              =          -
    COFP-KURSR              =          -
    COFP-KURSFIKRS       =          -
    COFP-KZKRS               =          -
    COFP-UMBKZ              =          -
    COFP-KBLNR               =          -
    COFP-KBLPOS            =          -
    COFP-HI FIVOR            =          -
    COFP-LO FIVOR          =          -
    COFP-HI ACCOUNT      =          -
    COFP-LO ACCOUNT     =          -
    COFP-HI LIFNR            =          -
    COFP-LO LIFNR           =          -
    COFP-HI KUNNR          =          -
    COFP-LO KUNNR         =          -
    COFP-XDELETE           =          -
    COFP-HI XOPVW         =          -
    COFP-LO XOPVW        =          -
    COFP-ZAEHK               =          -
    COFP-CHAINBELNR     =          -
    COFP-MWSKZ             =          -
    COFP-LEDNR               =          -
    COFP-BELTP               =          ‘1’
    COFP-VERSN              =          ‘0’
    COFP-OWAER             =          COSP-TWAER
    COFP-CPUDT               =          SY-DATUM
    COFP-CPUTM              =          SY-TIME
    after doing updation, its again saying Selection of all entries in table COFP with value type 51 to 62, selected year, selected cost elements above and for all selected WBS elements and all objects underneath. Summarisation by period.
    Now, can someone help me as how to proceed with the entire thing? An elaborate and illustrative answer would be highly appreciable.
    If you require any other information....then get back to me ..asap.
    Its bit urgent.
    Thanks & Regards,
    Ravi

    Hi
    update <table> from <i_tab>
    for different conditions.
    loop at i_cosp.
    if cosp-mandt eq sy-mandt and  cosp-objnr eq 'PR'.
    Read table i_PRPS with key  i_PRPS-OBJNR = i_COSP-OBJNR.
    if sy-subrc eq 0.
    update PRPS set PKOKR = ? where objnr = i_prpr-objnr.
    endif.
    endif.
    similarly for all the conditions
    Regards
    Message was edited by: Harikishore Sreenivasulu

  • How to import a schema into the Oracle Database -

    Hi
    I have downloaded schema (spatial MVDemo schema) from oracle. To implement a functionality in obiee 11g i need to import the downloaded schema in to Oracle database.
    some one please give me step by step commands to acheve the same by using sql plus.
    Please let me know if you need any information.
    TIA.
    Regards

    Pl post exact OS and database versions, along with a link to where you downloaded this demo from. Did that link not provide any details on how to import ?
    HTH
    Srini

  • How to export a table from one oracle server to another oracle server?

    Hi experts,
    Scenario : Copying table T1 from Server1 to Server2.
    Can I follow any of the following two options. Please advise if these options would be feasible under the current scenario.
    1) Create the same table T1 in Server2. Export the values of T1 in Server1 to an Excel sheet. Make the Excel sheet as source and import the values of the excel sheet to table T1 in Server2.
    2) Use an ETL tool like Oracle Warehouse builder to extract and load the values in T1 in Server1 to T1 in Server2.
    Can we schedule both option1 & 2 as a job in Oracle Warehouse Builder? The job will have 2 steps :-
    a) Delete all rows in T1 (Server2).
    b) Insert the values from T1(Server1) to T1(Server2).
    Please advise.
    Thanks,
    Debashish

    Can you exactly explain a little bit more what is the actual requirement.
    Just to kick off the things..
    In case:
    1) you just need to create a table based on another table in same schema. Its as simple as : create table table2 as (select * from table1)
    2) table1 is on remote db then
    create table table2 as (select * from table1@yourdblink)
    3) Need to export and import table1 refer this link :
    http://wiki.oracle.com/page/Oracle+export+and+import+?t=anon
    4) Need to refresh table periodically either schedule a job or create materialized view refer to this link :
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96567/repmview.htm
    Choose an approach. Then try it and see what errors you get, In case you get errors search on internet for that error code and how to resolve that and in case need any help post it here. But key is understanding first what exactly your requirement is and which approach you need/want to follow.

  • How to import a Table from VC to WebDynpro

    Hello,
    we want to create a WebDynpro that get his data from a vc modell.
    I created a input method at the interface controller, but I only get a single dataset, because of the parameter(can't say that the parameters are aray types).
    How must I modell or code to get data from a VC Tabel into a Web Dynpro modell?
    regards Tobias Arnold

    All table components in structured FM must be wrapped in elements. If you paste in a table, the elements will be created automatically and use default names, which are likely to be different than defined in the underlying EDD. So, the element tags show in red. You need to either change them all manually or use some kind of scripting. There is no automatic method, unless you use a plugin.
    You can speed things up by using the Find dialog. It can search for an element tag and replace it with another. You have to do one tag at a time.
    Russ

  • How to important "sent mail" from another account into Mail?

    I wasn't sure where to put this question because of the way this forum is organized.
    Anyway, here is my problem:
    I woke up thinking I may have forgotten to send an important e-mail yesterday. I thought, "No problem, I won't have to drive all the way to work. I'll just set up Mail on my iMac to use the e-mail account I use at work." It's an SBCGlobal account, so I found most of the information I needed about the mail servers and POP and IMAP and all that stuff that could be termed in a lot more user-friendly language so I don't have a conniption fit trying to figure out what it is I'm doing.
    I finally managed to get it set up to where all of the messages from the inboxes were imported into my Mail app. One big problem: I need to look at the *sent* mail, and if I didn't send the e-mail I thought I needed to, I need to access attachments that I sent to others.
    So how do I important the sent folder from my work e-mail account into Mail?

    I wouldn't doubt it. I work at a small church so we don't have much funding, but we're switching to Gmail. I found an older, unedited print copy of what I was supposed to send and made alterations to that and e-mailed it to the people who needed it. The other thing I was supposed to e-mail isn't essential, I suppose, as it's Sunday's bulletin and everyone will be picking one up tomorrow when they come to church anyway. It's just that I'm fairly new at the position, I love everyone at the church and with whom I work, and I want to do everything right 100% of the time to please them because I'm very Type A. I've been really getting a hang of my job, but it seems there's always one thing that I screw up. I guess I'll get better with experience. And hopefully switching to Gmail, if I do this again, I can just access everything from home.

  • Data extraction into sap table  from legacy oracle database

    Hello All,
        I have a scenario where I have two different software systems (SAP and xyz systems), where a intermediate table will be created in between the two systems that is shared. Data will be updated by the xyz systems into this shared table. Now, my questions regarding this shared table.
       1) Can we write some program or something to get the data from shared table to update the SAP?
       2) If possible send me the suggestions
       3) Please also send me the sample code to get the data from the shared table
    Thanks in advance,
      SDN powered

    this shared table should be compatiable to sap fields...write code to fetch data from this table and assign data to appropriate fields in SAP and insert the data into sap.
    1. Push mechanism
    Write a RFC on SAP side to insert entries into the table.
    Call the RFC from xyz application passing the data you want to insert.
    2. Pull mechanism
    Write a ABAP Program, where you can somehow read the data of the xyz application and insert data into the table.
    3. Flat file
    Dump the data from xyz application into the file.
    Write a ABAP program to read the file and update the table.

  • How to display BLOB images from the Oracle database within Crystal

    Let's say a have the following table
    IMAGES
    ========
    DOC_ID NUMBER
    DOC_NAME STRING
    DOC_IMAGE BLOB
    The BLOB field can have any type of document: PDF, email, WORD, EXcel, etc. I would like to present the DOC_ID and DOC_NAME and let the user click any of them. Once the user clicks the document stored in the database as BLOB, it is rendered using the default application associated to the extension. For example if the file name is ABC.XLS open MSExcel if the file is abc.pdf open Acrobat.
    I am using Crystal2008 and evaluating Crystal 4.0
    Does this requires programming?
    Thanks!!!

    Hi
    Crystal is a reporting tool and you canu2019t execute any code except free hand SQL.  When you pull any BLOB fields in crystal, it takes as a picture field and if that field contains image only it will display in your report.
    If you have any information other than image, it will not display any info in the report.
    If you want to insert Word , PDF and Excel then you will have to insert as ole object and can manage with location of the files.
    Thanks,
    Sastry

  • How do I import email messages from another server?

    Heya,
    So I can't figure out how to import mail messages from another server into this one? I had [email protected] pointing to the old one, when I repointed it obviously all my email "disappeared" because there is none on the new server. So how do I move it from the old server to the new one? Usually I'd just drag and drop the email message files over FTP but SLS doesn't seem to give me permission to do that on this one.
    Thanks!

    Search for discussions of the imapsync tool.

Maybe you are looking for

  • Cell background image problem

    Please tell me exactly how to add only one background gif to a cell. I have told it "no repeat" but it does just that. See: http://www.pskewedp.info/content.htm Thank you, Eleanor Eleanor T. Culling Leavenworth, WA European Alps Photos http://www.ele

  • Windows 7 64-bit iTunes

    I restored my PC using Windows 7 64-bit and tried to download and reinstall iTunes. I can download the file titled "iTunes64Setup.exe" and when I run it the bar that pops up does not fill up and then I receive the massage that says "Windows Installer

  • DVD Player for X61

    Can someone tell me where can I download DVD Player for my X61. I like Intervideo but need to pay. My X61 does not have DVD Player. Window Media Player cannot play some of my DVD format.

  • Displeasure with my purchase of my Elements 12

    I am writing to post my displeasure with my purchase of my Elements 12 and Premire Order # 103-0395833-0299421 for $110.00 in Sept. 2014 from Amazon. Shortly after I bought this program to upgrade from Elements 10 version a few weeks later Adobe came

  • Regarding servicetax on freight charges...............

    hi.... i need to calculate servvice tax on transportation.... for ex. if kf00 is 1000rs... the service tax should calculate on 20% of the freight charges...could anyone give me solution for this.......... Thank you