Create table for existing table

dear all
I have a partition table with millions records and i want to create table from that table
and i want the new table that i create it is contain the same structure(partition) and contain all data
i write this code
create table abc as select * from cda;
but this script donot work as i want (same structure(partition) and contain all data)
so anybody can help me
best regards

And it is not possible to alter the structure of the table in place? It sounds like you are going to be copying all the data from the current table to a new table and then back to the existing table once the existing table has been altered-- that is going to be very expensive in terms of resources, time, downtime windows, etc. Generally, you can just alter the table in place...
Assuming you really want to copy all the data twice, and that the new (staging?) table really needs to have the same partitioning scheme as the primary, the DBMS_METADATA suggestion would seem to work. Moving the data from the exisiting table to the staging table, you might consider partition exchange if you want the staging table to have the same indexes that the current table has.
Justin

Similar Messages

  • Creating Folder for Existing Folders

    Is it possible to create a new folder for AR for iOS so that you can move already existing folders into it? My folders have become a bit cluttered as I had to create more for specific files, but they should all be filed under another bigger folder. Thanks!

    Question: "Is it possible to create a new folder for AR for iOS so that you can move already existing folders into it?"
    Answer: (Assuming that you are referring to the PDF documents and folders that you access inside Adobe Reader for iOS) Yes, you can create nested folders using the file browser user interface in Adobe Reader for iOS,
    In the main screen (showing Documents, Acrobat.com, Camera to PDF, My Account, Help), you can create a new folder.
    Tap Documents.
    Tap Edit in the upper right corner.
    Tap the folder icon with a plus sign in the bottom toolbar.
    Enter a new folder name.
    You can navigate to an existing folder and repeat the steps above to create nested folders in Reader.  You can select multiple files and move them to the newly created nested folder as well.  But it's not possible to move a folder containing files to a different folder at once.
    See Help > Handbook > Copy, edit, delete, manage for more details.
    If you use Acrobat.com as a cloud storage service, you can create nested folders using the web browser interface (https://files.acrobat.com/), organize your files and folders, and access them in Adobe Reader for iOS.
    Hope this helps.

  • How to get the New created Hier for existing IO and IS in the Infopackage

    hello Gurus,
    I have created a new Custom hierarchy on an existing InfoObject 0Costcenter. There are many Hierarchies already existing and being fed from R3. This new hierarchy is just a regrouping of costcenters.
    Now I have created this new Hier and activated it, When I tried to create a Infopackage to load this new Hier, I am not finding the new created Hierarchy in the Hierarchy Selection tab of Infopakage.What should I do to see this new HIer.
    Thanks
    Simmi

    so, the costcenter hierarchy created by the user is not a std costcenter hierarchy, so it should be a set hierarchy. go to tcode BW07 in r/3, give the name of the table and field, if you like the name of the datasource too orelse the system woudl generate it. But the costcenter hierarchy is compounded to controlling area, you would need to write a user exit to populate the compounding object too in the datasource, orelse all the costcenters would be unassigned to controlling area. once created, you can check the same in rsa6. once you see it there, replicate the DS to BI, and after that the data flow is same. create a new infopack to load the set hierarchy, as you wont be able to see this hierarchy in the std costcenter hierarchies.
    check a few other threads:
    Tcodes BW10/BW07 - how to use these
    compounding for hierarchies:
    ZXRSAU04 - programming for compounding in hierarchy

  • How to create idocs  for  existing records

    Hi
    are there any standard program by which i could create and send the existing customer invoice (VF01) data thru EDI idoc to a 3rd party system even if the output type is not defined during the creation of the invoices?
    Regards
    Sujai

    I am supposed to send all customer invoice data to an external system. I have been able to configure the system to trigger an idoc when an invoice is saved. That takes care of my delta transfer. But i would like to know if there is a way by which i can send all the existing customer invoice data to the 3rd party system that were already created in the SAP system. Something like an initial download of all the existing records.
    I am asked to keep the abap development to Zero as far as possible, hence i am exploring the idea of finding any standard program that could do this for me.
    just like Tx: BD10 for the material master data.
    I tried VF31 but the problem is that the invoice that would have been created might not contain the output type as EDI. So is there a way by which i can achieve this task with any standard program?
    I also have another question:
    how do i do the configuration to send all the SD invoices to a specific partner all the time thru EDI by default?
    Sujai

  • Create program for existing partner

    Hi
    Please tell me how to create the Partner Program for the Existing Partner in My Partner list in Channel Manager.
    I Referred the partner document there is no specific setup for the existing partner. But After creating a new partner program can not able to Invite the partner, Because the new program can not be displayed in the inviting program list.
    Please tell me Solution for this as soon as possible.
    I am using the R12 server please tell me some solution or reference.
    Thanks
    Vivek

    What is the apps release ? and in which module you are trying this ?
    can you give us some more details.
    regards,

  • Creating Subtitles for Existing DVD

    Hello,
    I am just planning some investments and I am thinking about buying FCP Studio.
    But the frist project we should be working on is subtitling a collection of training DVD's.
    The lectures on them are in english and they now should be subtitled in some other languages.
    If we would have produced all of the DVD's from scratch this would be a easier job.
    Now my question: Do we have to convert all the movies back and re-create a DVD menu or is there a other way to add subtitles to existing DVD's. The DVD's from our customer are not encrypted, so we don't have any original material, the only thing we can work from are the DVD's them self.
    As we also plan to create our own movies in the future FCP would be a good program, but do you think we could do the above job with just this software?
    Would be glad to read som inputs from others and there experiences!
    Regard to who ever reads this
    Django

    You can't add anything to an already burned DVD. It is read only.
    Copy the contents of the DVD's VIDEO_TS folder to your computer.
    Use [MPEG Streamclip|http://www.squared5.com] to demux the VOB files to MPEG 2 and AC3 audio files. Bring those into DVD Studio Pro and re-author the disk.
    Now you can add subtitles, either by using the DVD SP interface or a plain text file.
    The text file should use the following formatting:
    $FontName = Arial
    $FontSize = 24
    //If you need to include comments, place them on their own line, preceded by a forward slash, a space, then another forward slash like the example here. This text will not be superimposed over the video. Sample formatting for subtitles is as follows:
    00:00:12:04 , 00:00:14:12 , This is a subtitle...
    00:00:16:14 , 00:00:19:08 , ...followed by another subtitle.
    //Comments can also be placed between subtitles.
    00:00:22:08 , 00:00:26:15 , This is the next subtitle.
    The file should NOT saved as Rich Text (.rtf)
    It MUST be saved as Plain Text (.txt)
    +Note: If you specify a font to use, no subtitle+
    +clips will appear if the font is not found on the computer that will be encoding the DVD. The font must be installed as a Mac OS X font— Mac OS 9 fonts are not used.+

  • Creating user for existing schema

    Hi,
    A colleague of mine created a schema and now we would like to create a user with the same name. How can this be done? When I try it it says that I cannot create a duplicate schema, but dropping the old one is not an option because it's already been filled with data.
    Thanks,
    Michael

    You can't.  When you create a user, the system must automatically create a schema with the same name. This is used for certain system, temporary objects.  You therefore can not have an existing schema with the same name.

  • Create batch for existing GR materials

    Hi,
    how can we create the batches for the materials whose GR is already done w/o Batch management active? imean i want to put  a new batch no for the existing GR materials?

    you cant activate bach managemet if the material is in stock.
    As u said thet u have material in stock, then u will not be able to activite that materiasl for batch mgt
    u will have to make stock zero for this period last period and last year last period
    any way when u try to put the indicator on in material master systel will give the list where the material is used and u will have to deleat all those document.
    bust way is to creat new material and move the stock form one materia to another may be by physical inventoru or materia to mater transfer
    hope this helps

  • How to create password for EXISTING address book application

    I want to password protect my address book as a whole or individual addresses/contacts. I can't find any documentation or prompts about how to do this.  Can anybody help?
    Solved!
    Go to Solution.

    Greetings, and welcome to the BlackBerry.com Support Forums.
    There is a not a function in the native OS to only password protect the Address Book alone, or individual contacts.
    You may password protect the entire device. On your device > Options > Security > General Settings (or Password on some later OS versions).
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Creating View for a table with parent child relation in table

    I need help creating a view. It is on a base table which is a metadata table.It is usinf parent child relationship. There are four types of objects, Job, Workflow, Dataflow and ABAP dataflow. Job would be the root parent everytime. I have saved all the jobs
    of the project in another table TABLE_JOB with column name JOB_NAME. Query should iteratively start from the job and search all the child nodes and then display all child with the job name. Attached are the images of base table data and expected view data
    and also the excel sheet with data.Picture 1 is the sample data in base table. Picture 2 is data in the view.
    Base Table
    PARENT_OBJ
    PAREBT_OBJ_TYPE
    DESCEN_OBJ
    DESCEN_OBJ_TYPE
    JOB_A
    JOB
    WF_1
    WORKFLOW
    JOB_A
    JOB
    DF_1
    DATAFLOW
    WF_1
    WORKFLOW
    DF_2
    DATAFLOW
    DF_1
    DATAFLOW
    ADF_1
    ADF
    JOB_B
    JOB
    WF_2
    WORKFLOW
    JOB_B
    JOB
    WF_3
    WORKFLOW
    WF_2
    WORKFLOW
    DF_3
    DATAFLOW
    WF_3
    WORKFLOW
    DF_4
    DATAFLOW
    DF_4
    DATAFLOW
    ADF_2
    ADF
    View
    Job_Name
    Flow_Name
    Flow_Type
    Job_A
    WF_1
    WORKFLOW
    Job_A
    DF_1
    DATAFLOW
    Job_A
    DF_2
    DATAFLOW
    Job_A
    ADF_1
    ADF
    Job_B
    WF_2
    WORKFLOW
    Job_B
    WF_3
    WORKFLOW
    Job_B
    DF_3
    DATAFLOW
    Job_B
    DF_4
    DATAFLOW
    Job_B
    ADF_2
    ADF
    I implemented the same in oracle using CONNECT_BY_ROOT and START WITH.
    Regards,
    Megha

    I think what you need is recursive CTE
    Consider your table below
    create table basetable
    (PARENT_OBJ varchar(10),
    PAREBT_OBJ_TYPE varchar(10),
    DESCEN_OBJ varchar(10),DESCEN_OBJ_TYPE varchar(10))
    INSERT basetable(PARENT_OBJ,PAREBT_OBJ_TYPE,DESCEN_OBJ,DESCEN_OBJ_TYPE)
    VALUES('JOB_A','JOB','WF_1','WORKFLOW'),
    ('JOB_A','JOB','DF_1','DATAFLOW'),
    ('WF_1','WORKFLOW','DF_2','DATAFLOW'),
    ('DF_1','DATAFLOW','ADF_1','ADF'),
    ('JOB_B','JOB','WF_2','WORKFLOW'),
    ('JOB_B','JOB','WF_3','WORKFLOW'),
    ('WF_2','WORKFLOW','DF_3','DATAFLOW'),
    ('WF_3','WORKFLOW','DF_4','DATAFLOW'),
    ('DF_4','DATAFLOW','ADF_2','ADF')
    ie first create a UDF like below to get hierarchy recursively
    CREATE FUNCTION GetHierarchy
    @Object varchar(10)
    RETURNS @RESULTS table
    PARENT_OBJ varchar(10),
    DESCEN_OBJ varchar(10),
    DESCEN_OBJ_TYPE varchar(10)
    AS
    BEGIN
    ;With CTE
    AS
    SELECT PARENT_OBJ,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM basetable
    WHERE PARENT_OBJ = @Object
    UNION ALL
    SELECT b.PARENT_OBJ,b.DESCEN_OBJ,b.DESCEN_OBJ_TYPE
    FROM CTE c
    JOIN basetable b
    ON b.PARENT_OBJ = c.DESCEN_OBJ
    INSERT @RESULTS
    SELECT @Object,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM CTE
    OPTION (MAXRECURSION 0)
    RETURN
    END
    Then you can invoke it as below
    SELECT * FROM dbo.GetHierarchy('JOB_A')
    Now you need to use this for every parent obj (start obj) in view 
    for that create view as below
    CREATE VIEW vw_Table
    AS
    SELECT f.*
    FROM (SELECT DISTINCT PARENT_OBJ FROM basetable r
    WHERE NOT EXISTS (SELECT 1
    FROM basetable WHERE DESCEN_OBJ = r.PARENT_OBJ)
    )b
    CROSS APPLY dbo.GetHierarchy(b.PARENT_OBJ) f
    GO
    This will make sure it will give full hieraracy for each start object
    Now just call view as below and see the output
    SELECT * FROM vw_table
    Output
    PARENT_OBJ DESCEN_OBJ DESCEN_OBJ_TYPE
    JOB_A WF_1 WORKFLOW
    JOB_A DF_1 DATAFLOW
    JOB_A ADF_1 ADF
    JOB_A DF_2 DATAFLOW
    JOB_B WF_2 WORKFLOW
    JOB_B WF_3 WORKFLOW
    JOB_B DF_4 DATAFLOW
    JOB_B ADF_2 ADF
    JOB_B DF_3 DATAFLOW
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How do I CREATE IF NOT EXISTS Temp table in PLSQL?

    hello, how do I CREATE IF NOT EXISTS Temp table in PLSQL? The following table is to be created in FIRST call inside a recursive function (which you'll see in QUESTION 2).
    QUESTION 1:
    CREATE GLOBAL TEMPORARY TABLE TmpHierarchyMap
                                  Id numeric(19,0) NOT NULL,
                                  ParentId numeric(19,0) NOT NULL,
                                  ChildId numeric(19,0) NOT NULL,
    ... more ...
                             ) on commit delete rows');
    QUESTION 2: How to return a temp table from a function?
    For example, this is how I'm doing it at the moment, using Nested Table.
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE TmpHierarchyMapObjType AS OBJECT
                   Id numeric(19,0) ,
                   ParentId numeric(19,0),
                   ChildId numeric(19,0),
    ... more ...
         EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE TmpHierarchyMapTableType AS TABLE OF TmpHierarchyMapObjType;';
    CREATE OR REPLACE FUNCTION fnGetParentsTable
    ObjectId number,
    ObjectClassifier varchar2
    RETURN TmpHierarchyMapTableType
    IS
    TmpHierarchyMap TmpHierarchyMapTableType := TmpHierarchyMapTableType();
    ThisTempId varchar2(32);
    CURSOR spGetParents_cursor IS
    SELECT
    Id,
    ParentId,
    ChildId,
    FROM TMP_HIERARCHYMAP
    WHERE TempId = ThisTempId;
    BEGIN
    SELECT sys_guid() INTO ThisTempId FROM dual;
    spRecursiveGetParents(ObjectId, ObjectClassifier, ThisTempId);
    FOR oMap in spGetParents_cursor LOOP
    TmpHierarchyMap.Extend();
    TmpHierarchyMap(TmpHierarchyMap.Count) := TmpHierarchyMapObjType( oMap.Id
    , oMap.ParentId
    , oMap.ChildId
    END LOOP;
    DELETE FROM TMP_HIERARCHYMAP WHERE TempId = ThisTempId;
    RETURN TmpHierarchyMap;
    END fnGetParentsTable;
    QUESTION 3: what does the word GLOBAL means? I read that temp table is visible only to a particular database connection/session and will be dropped automatically on termination of the session. i can only find this information in some forum discussion but failed to locate this in Oracle doc, can someone point me in right direction please?
    Many thanks!
    REF:
    http://stackoverflow.com/questions/221822/sybase-developer-asks-how-to-create-a-temporary-table-in-oracle
    http://www.oracle-base.com/articles/8i/TemporaryTables.php

    devvvy wrote:
    so if I CREATE GLOBAL TEMPORARY TABLE twice on second pass of my recursive function what then...?You don't create it inside your function.
    You create the GTT once on your database outside of the function and then just leave it there and use it.
    Tables should not be dynamically created and dropped.
    Only other database engines such as SQL Server use the concept of creating temporary tables during the execution of code. Oracle uses a "create once, use whenever" methodology.

  • Best practice for existing target table

    We want to develop mappings for existing target tables.
    1. The tables are imported from the datadictionary
    2. The tables are used in the mappings
    Is it a good idea to set deploy to no for these tables, to prevent them from beeing used by the deplomentmanager (default action:create)?
    Thanks your for a good practice
    Stp
    Message was edited by:
    user444776
    Message was edited by:
    user444776

    Hi,
    Yes, you are right. for the tables which already exist in the database schema the deployment actions should be "None". Unless you planned and made any changes to the table structures.
    Cheers
    Mahesh

  • Creating SYNONYM for all tables who don't have one at once!

    Hello to all,
    I'm trying to create synonyms for every table who's missing one at the moment. I'm trying this code:
    declare
    cursor cur_objects is
    select obj.object_name , obj.owner
    from all_objects obj
    where owner = '&&SCHEMA_OWNER'
    AND NOT EXISTS (SELECT *
    FROM all_synonyms syn
    WHERE obj.object_name = syn.table_name)
    AND obj.object_type = 'TABLE'
    AND obj.object_name LIKE 'CI_%';
    begin
    for rec_objects in cur_objects loop
    begin
    dbms_output.put_line(rec_objects.object_name);
    execute immediate('create public synonym ' || rec_objects.object_name || ' for '
    || rec_objects.owner ||'.'||rec_objects.object_name )
    exception when others then
    null;
    end;
    end loop;
    end;
    I'm getting this error:
    ORA-06550: line 10, column 37:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    begin function package pragma procedure subtype type use
    <een ID>
    <een scheidingsteken-ID tussen dubbele aanhalingstekens> form
    current cursor
    I'm still pretty new at PL/SQL and can't get it to work. Does anyone got any tips ?
    Thnx already

    Ok now I got this error:
    RA-06550: line 17, column 1:
    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
    * & = - + ; < / > at in is mod remainder not rem return
    returning <een exponent (**)> <> or != or ~= >= <= <> and or
    like LIKE2_ LIKE4_ LIKEC_ between into overlaps using ||
    multiset bulk year DAY_ member SUBMULTISET_
    The symbol ";" was substituted for "EXCEPTION" to continue.

  • Create table with name already existed

    Hello,
    I am trying to create a table which has the same table name that already exists in a different schema. The table already exist in another user's schema but why can't I create the same table in my own schema with the same name? Thank you.

    Check this out.
    SQL> create user testuser1 identified by testuser1 default tablespace user01;
    User created.
    SQL> create user testuser2 identified by testuser2 default tablespace user01;
    User created.
    SQL> grant create session, create table, create public synonym,
      2  unlimited tablespace to testuser1;
    Grant succeeded.
    SQL>  grant create session, create table, create public synonym,
      2   unlimited tablespace to testuser2;
    Grant succeeded.
    SQL> connect testuser1/testuser1
    Connected.
    SQL> create table mytable(col1 number);
    Table created.
    SQL> create public synonym mytable for testuser1.mytable;
    Synonym created.
    SQL> grant select on mytable to public;
    Grant succeeded.
    SQL> connect testuser2/testuser2
    Connected.
    SQL> create table mytable(col1 number);
    Table created.
    SQL> drop table mytable;
    Table dropped.
    SQL> desc mytable
    Name                                      Null?    Type
    COL1                                               NUMBER
    SQL> desc testuser1.mytable
    Name                                      Null?    Type
    COL1                                               NUMBER
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Production

  • Unable to create table because object exists. Where do I find object ?? :-0

    Hi,
    I deployed some scripts to a database, had to roll it back and then deployed again but I'm unable to create a particular table. The error says an object already exists but I can't find it. Hope this isn't a dumb question. Oracle 10.2.0.4 2 node RAC on Linux
    I have looked through dba_objects for anything called LS_AURULD_RULEDATA or LI_AURULD_RULEDATA.
    Here is the command and error..........
    CREATE TABLE aee.T_AUDITRULEDEFINITION
    2 (
    OBID RAW(16) CONSTRAINT NN_AURULD_OBID NOT NULL,
    SECURE_COMPANY_FK RAW(16) CONSTRAINT NN_AURULD_SCFK NOT NULL,
    AUDITRULESET_FK RAW(16),
    AUDITRULECLASST_FK NUMBER(2,0),
    DESCRIPTION NVARCHAR2(128),
    FAILUREACTION_FK NUMBER(2,0),
    RULEDATA NCLOB,
    RULETYPE NVARCHAR2(50),
    SEQUENCENUMBER NUMBER(10,0),
    TAG NVARCHAR2(64)
    LOB(RULEDATA) STORE AS LS_AURULD_RULEDATA (INDEX LI_AURULD_RULEDATA)
    15 TABLESPACE MOTOR_TABLES;
    LOB(RULEDATA) STORE AS LS_AURULD_RULEDATA (INDEX LI_AURULD_RULEDATA) *
    ERROR at line 14:
    ORA-00955: name is already used by an existing object
    Any help appreciated

    Thanks for pointing me towards dba_lobs
    SQL> select TABLE_NAME,INDEX_NAME from dba_lobs where OWNER='AEE' and index_name like 'LI_AURULD%';
    TABLE_NAME INDEX_NAME
    BIN$XdjCvAyQhMrgQBCsZat/dQ==$0 LI_AURULD_RULEDATA
    I purged the recyclebin and all was ok

Maybe you are looking for

  • HP Deskjet 812C won't print in black unless color is on the page

    My mom's printer stopped printing in black unless some of the text is turned from black into a color (we picked red) anywhere on the page. I removed the black cartridge and put the same one back in. It printed one page of only black ink.  Then no mor

  • Late-2009 A1286 external display NOT working

    I realize there's a lot of talk on this issue but i can't find an answer applicable to my situation. Pro unibody with a cracked LCD Tried to bypass fixing it by hooking up an external monitor via minidisplay port-- NO luck. Very irritating. Attempts:

  • Photoshop will not open

    I am running Photoshop 14.2.1 with OSX 10.9.4. I updated Photoshop a half an hour ago and restarted the computer after the update. Still not working. Everytime I double click to open it, it comes up in error. This is a very short version of what is c

  • Sending a mail Thro abab report

    Hi Experts,           I want to send a Excel file to my cusomer while i am running analysis report. what FMs are available for sending Local Excel file? and what is procedure to send a local PC Excel file to somebody thro abap report? Thanks, Neptune

  • Tomcat startup problem Win98

    Hello Friends, I am trying to start up Tomcat server, but keep getting error that TOMCAT_HOME is not set. I am using Windows 98. I tried to set the Tomcat_home using SET TOMCAT_HOME = C:\Tomcat in autoexec.bat but it gives error - out of enviromental