How to create partition from one table to another?

Hi,
Can any one help me in this :
I have copied table from one schema to another by using the following command. The table is around 300 GB in size and the partitions are not copied. Now i got a request to create partitions in the destination table similar to the source table.
CREATE TABLE user2.table_name AS SELECT * FROM  user1.table_name;
I am using Oracle 9i database. This is very urgent, could any one please suggest me how can i create the partitions in  user2 table as user1 table.

If you have the TOAD/ SQL DEVELOPER  , get the partition DDL from the source table and execute it in the newly created table.
or you can use DBMS_METADATA:
SET LONG 10000
SELECT dbms_metadata.get_ddl('TABLE', 'TEST')
FROM DUAL;
Thanks,
<Moderator Edit - deleted link signature - pl see FAQ link on top right>

Similar Messages

  • How to copy data from one table to another (in other database)

    Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
    ResultSet rset = stmt.executeQuery("select ...");
    But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.

    No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.

  • How to move records from one table to another?

    Is there a way to copy data and column names from one table to another table?
    I am trying to copy one production database table onto the development database. we are using Oracle 10g. I tried exporting to an xls file and importing to the other table but this needs to create destination table with the column names. Is there any better approach to achieve this?

    Hello,
    You can create dblink between production and dev and from dev just
    *1. create table mytable as select * from mytable@dblink;**2. Use of export/import or datapump*
    Example
       On prod
       exp username/password tables=mytable1,mytable2 file=mytableexport.dmp log=mytableexport.log
       On dev
       imp username/password tables=mytable1,mytable2 file=mytableexport.dmp log=mytableimport.log*3. Datapump*
    http://www.oracle-base.com/articles/10g/OracleDataPump10g.php
    *4. Generate csv formatted file and use sqlldr or external*
    External Table: http://www.adp-gmbh.ch/ora/misc/ext_table.html
    Sqlldr: http://www.psoug.org/reference/sqlloader.html
    Regards
    Edited by: OrionNet on Feb 13, 2009 6:52 PM

  • How to move BLOBs from one table to another ??

    Hi All,
    I am trying to move blobs from one table to another, however my insert statement is not working. What i mean is its running, but records are not being inserted into the table.
    This is my first time moving blobs, so please bear with me.
    here is my insert statement:
    INSERT INTO CASES.FILESTORAGE
    SELECT      DID,
              DRENDITIONID,
              DLASTMODIFIED,
              DFILESIZE,
              DISDELETED,
              BFILEDATA       // this attribute is the BLOB
    FROM      USSC_CASES_TMP.FILESTORAGE
    WHERE      DID NOT IN (SELECT DID FROM CASES.FILESTORAGE);here is the DDL for the table.
    CREATE TABLE "USSC_CASES_TMP"."FILESTORAGE"
        "DID"          NUMBER(*,0) NOT NULL ,
        "DRENDITIONID" VARCHAR2(30 CHAR) NOT NULL ,
        "DLASTMODIFIED" TIMESTAMP (6),
        "DFILESIZE"  NUMBER(*,0),
        "DISDELETED" VARCHAR2(1 CHAR),
        "BFILEDATA" BLOB,
        CONSTRAINT "PK_FILESTORAGE" PRIMARY KEY ("DID", "DRENDITIONID")
      );CASES.FILESTORAGE table has the same DDL, but in a different schema.
    Thanks in advance.

    If this seems rather straight forward. If the schema are exact simply execute:
    inset into [destination] select * from [source] ;if something is amiss you should be throwing errors someplace* but try this:
    create table [scratch table name] as select * from [source table] where [place some limit here] ;If this does not work then something someplace is very wrong and if you are not the DBA you need to get this persons attention, fairly quickly. I would do the above from sqlplus and then after each statement would:
    commit;then check to see if it succeeded.

  • How to create PO from one palnt to another plant

    Dear All,
    We need to create new Purchase orders from One plant to another plant. Can you please provide me any suggestions to achive this.
    Main hurdle are: We need to create new PO for the completely open Purchase order for old plant.
    Secondly we need to create PO from old PO which have partial goods receipt and which have equally invoice receipts, so that we can create new PO for the open quanityt and the open invoices.
    I do not see any other case which we can consider to open new PO from the old PO. If there are to consider some please do let me know.
    Secondly we have to extend the materials from one plant to another plant. Issue is we do not know which views are maiantained for materials which needs to be extend also what are the fields filled for each views. In order to avoid extracting the data from table, structuring it and then reload for new plant we are planning to create some program or is there any existing standard program which can extend material from one plant to another.
    One more issue in out plant extension is we have some Z fields in MARC so how we can use that too to extend it to another plant.
    Can you please provide me some suggestions/help on this.
    Thanks.
    Shashi

    Please check this answered link for extending material to another plant through BAPI:
    BAPI to extend material
    If new fields are added to material master, they are applicable at client level, so after extension to new plant, those newly created fields will be available there as well.
    For copying PO's to new plant, you can copy them through ME21n.

  • How give a data from one table to another table

    Oracle forms6i
    Hai All
    I had two table in table data base and from one table the data has to move to another table using forms
    The two tables are
    First table name temp_att from this the data has to move and the data are
    BARCODE BARDATE BARTIME Row_number
    0000000009949296 08-NOV-09 0800 1
    0000000009949296 08-NOV-09 1230 2
    0000000009949296 08-NOV-09 1245 3
    0000000009949296 08-NOV-09 1645 4
    0000000009949297 08-NOV-09 0815 1
    0000000009949297 08-NOV-09 1230 2
    0000000009949297 08-NOV-09 1300 3
    0000000009949297 08-NOV-09 1650 4
    Another table dail_att and the fields are
    barcode,bardate,intime(mintime),outtime(maxtime),intrin(nextmintime)intr,(nextmaxtime)
    Pls give some solutions to solve this problem.
    Thanks & Regards
    Srikkanth.M

    Hai
    Could pls explain me little bit clear
    I have explained my problem clearly in the last Post
    This is the requirement
    I had two table in table data base and from one table the data has to move to another table using forms
    The two tables are
    First table name temp_att from this the data has to move and the data are
    BARCODE BARDATE BARTIME Row_number
    0000000009949296 08-NOV-09 0800 1
    0000000009949296 08-NOV-09 1230 2
    0000000009949296 08-NOV-09 1245 3
    0000000009949296 08-NOV-09 1645 4
    0000000009949297 08-NOV-09 0815 1
    0000000009949297 08-NOV-09 1230 2
    0000000009949297 08-NOV-09 1300 3
    0000000009949297 08-NOV-09 1650 4
    Another table dail_att and the fields are
    barcode,bardate,intime(mintime),outtime(maxtime),intrin(nextmintime)intr,(nextmaxtime)
    Pls give some solutions to solve this problem.
    Thanks & Regards
    Srikkanth.M

  • How to copy file from one table to another table at another database

    I need to transfer my tables from one workspace and schema to another workspace and schema. Basically I need to create again all the tables at this new schema. How could I transfer data from tha table at old schema to the table at new schema when this table has files stored in it? (data type is blob)
    thank you so much,
    Silver

    Hello Silver,
    Depending which database you're using (if it's available) I would recommend to use datapump.
    Datapump allows you to copy an entire schema to another database, it's the "new" export/import you might now.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • How to transfer data from one table to another without duplicates

    This is what I use to quote bathroom remodels. The first thing I do is completely fill in the Master Item List with every Product or Service we can think of to do the project. The Type column has a pop-up menu which includes Combo because some Contractors don't separate the Product from Labor. The Category Totals Table is useful but since some Contractors provide Product and Service at the same time on one invoice I don't get accurate breakdowns for generating my invoices.
    What I would like is to transfer all Vendor names included in the project to the Vendor Totals Table but without any duplicates. Some Contractors might perform services in several categories. I've read many listings in the forum and am just not seeing the answer.
    I have a sample file ready to send. I don't see a way to send it with this message. First Post! Sorry!
    Thank You
    Jeff

    jwoods007 wrote:
    What I would like is to transfer all Vendor names included in the project to the Vendor Totals Table but without any duplicates.
    Hi Jeff,
    Welcome to Apple Discussions and the Numbers '09 forum.
    If your Vendor names (including duplicates) are all in the same column of the source table, it shouldn't be difficult to transfer them to a second table using the technique described below.
    For the example, the source table is named Main and has one header row, the Vendors are listed in column C (starting at C2), and column B is used as an index column. Note that to use VLOOKUP, the index column must be to the left of the Vendor column.
    The index is generated using the following formula in B2, and filled down to the end of the column:
    =IF(COUNTIF(C$1:C2,C)=1,MAX($B$1:B1)+1,"")
    On the second table, Vendor List, the following formula is used in Column A (starting at A2) to collect the indexed vendors from the Main table"
    =IFERROR(VLOOKUP(ROW()-1,Main :: B:C,2,FALSE),"")
    IFERROR is used to trap the "couldn't find" error in the 'empty' rows of Vendor List.
    'FALSE' displays as "exact-match" in the formula, and prevents the rpeated listing of the last vendor that would be created by 'close-match'.
    Regards,
    Barry

  • How to take value from one table to another table?

    Hi,
    My requirement is,I have two tables those are Document and Transaction both having one common column "Docseriescode"
    in Document table already having different records with "Docseriescode".
    when i am going  to transaction table for adding records,  in "docseriescode" column automatically generate perticular Docseriescode
    eg:
    i have one "Cargo" record in Document Table with code CCN
    when i am going to Transactional table for inserting in this Docseriescode columns automatically get "CCN" code and get a drop down value
    anybody help me?

    Your use case is a simple master detail relation between two tables. If you don't have foreign keys in the db you can build the associations and links yourself in jdev. Doing this enables you to create  detail rows from a master row where the pk of the master is automatically set in the fk of the detail.
    Here you find more info http://docs.oracle.com/cd/E35521_01/web.111230/e16182/bcquerying.htm#ADFFD292 and Displaying Master-Detail Data - 11g Release 2 (11.1.2.3.0)
    and a sample Master Detail Insert/Delete Sample | JDev &amp;amp; ADF Goodies
    Timo
    Message was edited by: TimoHahn

  • How to Transfer Rows from one table to another in a different Page

    Hi Friends,
    My problem is; I need to call a custom page as a popup using Java-Script. ( This is because our business users want the multi-select LOV to look and function differently ).
    I have a table in the popped-up page from where; upon a button action I need to close the pop-up and transfer the selected rows , back to the base-page's table.
    ( Both the Base Page and the Pop-Up are Custom Pages.)
    Please find below the AM code that I call before closing the window using Java Script.
    But the Base-Page table remains un-disturbed. Can you please show me how to do the transfer of records if possible ?
    OAViewObjectImpl main_vo = getBasePageTableVO1();
    OAViewObjectImpl sel_vo = getPopupPageTableVO1();
    int fetchedRowCount = sel_vo.getFetchedRowCount();
    RowSetIterator iterator = sel_vo.createRowSetIterator("SelectedRows_Iterator");
    if (fetchedRowCount > 0)
    iterator.setRangeStart(0);
    iterator.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    PopupPageTableVORowImpl row = (PopupPageTable)iterator.getRowAtRangeIndex(i);
    BasePageTableVORowImpl main_row = (BasePageTableVORowImpl)main_vo.createRow();
    if (main_vo.getFetchedRowCount() == 0)
         main_vo.setMaxFetchSize(0);
         main_vo.setWhereClause(" 1 = 0 ");
         main_vo.executeQuery();
         main_vo.setCurrentRow(main_vo.last());
    main_vo.next();
         main_vo.insertRow(main_row);
         main_row.setNewRowState(main_row.STATUS_INITIALIZED);
         main_vo.setCurrentRow(main_row);
    try
    main_row.setField1(row.getField1());
    main_row.setField2(row.getField2());
    main_row.setField3(row.getField3());
    catch(JboException _ex)
    iterator.closeRowSetIterator();

    Thanks Ramkumar. I am able to catch the action after I used formSubmit .
    The below lines in processRequest declares the function cszRefreshBase and later; on attaching the function name in the open window java script call, I get my desired functionality.
    StringBuffer stringbuffer = new StringBuffer();
    stringbuffer.append("function cszRrefreshBase(lovwin, event) ");
    stringbuffer.append("{ ");
    stringbuffer.append(" if (!lovwin.PopupSL) ");
    stringbuffer.append(" return false; ");
    stringbuffer.append(" submitForm('DefaultFormName', 0, {'cmePopupEvent':'popupUpdate'}); ");
    stringbuffer.append("}");
    oapagecontext.putJavaScriptFunction("cszRefreshBaseJS", stringbuffer.toString());

  • How to move record from one table to another one within same DB

    Hi, All
    What I'm trying to do here is move a specific record in table A to a history table called A_HIS. The only differece between these two tables are A_HIS has two extra fields that record the insertion time and user. All the rest of fields are the same.
    Since table A has more than 40 fields and it would be very time consuming to set every field and run an insert. Can anyone give me a suggestion please? Thanks a lot!
    kiki

    You could try something like this:
    INSERT INTO t1 (t1c1,t1c2, t1c3 ...) SELECT t2c1, t2c2, t2c3 ... FROM t2;Not sure how portable that is.

  • How to convert data when transferring from one table to another

    I have two tables and these are the structure of the tables
    create table E1(
    ID NUMBER
    ,NAME VARCHAR2(30)
    , DESIGNATION VARCHAR2(30)
    ,GENDER VARCHAR2(10));
    create table E2(
    ID NUMBER
    ,NAME VARCHAR2(30)
    , DESIGNATION VARCHAR2(3)
    ,GENDER NUMBER); Now I want to transfer records from one table to another using a master tables where data are compared because the datatypes in tables are different
    The first one is a gender table to match the gender and convert
    create table Gender(
    E1 varchar2(10),
    E2 number);The second is for the designation
    create table Designation(
    E1 varchar2(30),
    E2 varchar2(3);How to match and convert the data so that it can be transfered.

    Peeyush wrote:
    Can we do it with the help of a cursor.
    All SQL executed by the database are parsed as cursors and executed as cursors.
    I mean I have to insert data in bulk and I want to use cursor for it.The read and write (select and insert) are done by the SQL engine. The read part reads data and passes it to the write part that inserts the data.
    Now why would using PL/SQL and bulk processing make this faster? It will reside in-between the read part and the write part being done by the SQL engine.
    So the SQL engine reads the data. This then travels all the way to the PL/SQL engine as a bulk collect. PL./SQL then issues an insert (the write part to be done by the SQL engine). And now this very same data travels all the way from the PL/SQL engine to the SQL engine for insertion.
    So just how is this approach, where you add extra travel time to data, faster?
    and i want to commit the transaction after every 50 recordsWhy? What makes you think this is better? What makes you think you have a problem with not committing every 50 rows?

  • How to insert records with LONG RAW columns from one table to another

    Does anybody know how to use subquery to insert records with columns of LONG RAW datatype from one table to another? Can I add a WHERE clause in the subquery statement? Thanks.

    Insert into ... Select statements are not supported for long or long raw. You will have to either use PL/SQL or convert your long raw to blobs.

  • Create Trigger to insert records from one table to another

    I created the below trigger to move data from one table to another after records have been inserted from another table to that table. What I need done is that each time records have been inserted into TEST_TBL, one of these actions codes should be implimented: U-update, N-insert, D-delete and inserted into TEST_TBL1. But each time I run the script, I get bunch of errors. Please see the script below: - Your help will be appreciated.
    create or replace
    trigger POWER_tr
    after update or insert or delete ON test_tbl
    for each row
    begin
    if updating then
    insert into test_tbl1
    (idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, action_code, date_added
    VALUES
    (idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, 'U', sysdate);
    ELSif INSERTING then
    insert insert into test_tbl1
    (idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, action_code, date_added
    VALUES
    (idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, 'N', sysdate);
    ELSIF deleting then
    insert into test_tbl1
    (idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, action_code, date_added
    VALUES
    (idx, mke, ctl, ori, nam, sex, rac, pob, dob, hgt, 'D', sysdate);
    END IF;
    END POWER_tr;
    Thank you,
    Albert Zaza
    Edited by: azaza on Mar 1, 2009 4:14 PM

    Hello
    At the end of trigger show errors / and post what errors are you getting exactly?
    Here is a simple example for your reference, this will save old values in history table; you can replace it with new values if that's what do you want.
    CREATE OR REPLACE TRIGGER TRG_DU
       AFTER DELETE OR UPDATE
       ON EMPLOYEE    REFERENCING NEW AS New OLD AS Old
       FOR EACH ROW
    DECLARE
    BEGIN
       IF UPDATING
       THEN
          INSERT INTO employee_hist
            VALUES   ('UPDATE',
                      :OLD.empid,
                      :OLD.name,
                      :OLD.deptid);
       ELSIF DELETING
       THEN
          INSERT INTO employee_hist
            VALUES   ('UPDATE',
                      :OLD.empid,
                      :OLD.name,
                      :OLD.deptid);
       END IF;
    EXCEPTION
       WHEN OTHERS
       THEN
          -- Consider logging the error and then re-raise
          RAISE;
    END TRG_DU;
    /Regards
    Edited by: OrionNet on Mar 1, 2009 7:27 PM

  • Adding Data From One Table to Another

    Now, this doesn't strike me as a particularly complex problem, but I've either strayed outside the domain of Numbers or I'm just not looking at the problem from the right angle. In any case, I'm sure you guys can offer some insight.
    What I'm trying to do is, essentially, move data from one table to another. One table is a calendar, a simple two column 'date/task to be completed' affair, the other is a schedule of jogging workouts, i.e, times, distances. Basically, I'm trying to create a formula that copies data from the second table onto the first but only for odd days of the week, excepting Sundays (and assuming Monday as the start of the week). Now, this isn't the hard part, I can do that. The problem comes when I replicate the formula down the calendar. Even on the days when the 'if' statement identifies it as an 'even day', the cell reference to the appropriate workout on the second table is incremented, so when it comes to the next 'odd day', it has skipped a workout.
    I can't seem to see any way of getting it to specifically copy the NEXT line in the second table, and not the corresponding line.
    This began as a distraction to try and organise my running so I could see at a glance what I had to do that day and track my progress, but now it's turned into an obsession. SURELY there's a solution?
    Cheers.

    Hi Sealatron,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Several possible ways to move the data occur to me, but the devil's in the details of how the data is currently arranged.
    Is it
    • a list of three workouts, one for each of Monday, Wednesday and Friday, then the same three repeated the following week?
    • an open-ended list that does not repeat?
    • something else?
    Regards,
    Barry

Maybe you are looking for

  • Q10 - problem with SKYPE after upgrading to 10.3.1

    Hello ! After i made the upgrade on my Q10 at 10.3.1 OS, the SKYPE doesn't work. It give me the following message : "Unfortunally proces com.android.systemapps has been stopped" Why don't you make SKYPE for BlackBerry OS and this version that is on B

  • How to pass paramter JHeadstart jsp using setCurrentRowWithKeyValue

    How i can use setCurrentRowWithKeyValue or other ADF function to pass one value to JSP / JHS page and Jheadstart give me rows matching this parameter value passed to this page JHS use setCurrentRowWithKey but now i need to pass a value not a rowkey f

  • PO history - VERY URGENT

    What is the transaction of  accessing PO history report ?

  • Return STO

    hi, i have created return item in the same STO. then I do the MIGO for this PO, error message is display PO GR quantity exceeded by                   1 PC Message no. 8J627 Pls advice. And would you pls provide more detail for the process of return S

  • Frustrated: Novice Illustrator User Needs HELP

    Frustrated: Novice Illustrator User Needs HELP Hello All I am a novice user of Illustrator [after you read my question it will probably be obvious] running Illustrator 14.0.0 (CS4) - on a MAC iMac running 10.4.11.  I am a small business owner and hav