Insert as select on a table with 759 columns, including the Vitrual columns

Dear people,

DB version: 11.2.0.3.4
Quality: Production
Type: 2 node RAC

Description of the problem: we meet with repeated ORA-00600 when we tried expdp a table as part of the application process. This has later been explored as a logical corruption on the primary key index. Request team works on the deletion and re-creation of the index according to the suggestion of support oracle.
In the meantime, I tried to copy the table data affected with insert that choose, since exp pump/classic/ETG work or meet the requirement.

The affected table contains more than 255 columns, to be precise - 757 normal columns and 2 virtual columns, these 2 virtual columns to create a composite subpartition on the table. Subparts are compressed BASIC.

Since we cannot load the data in a virtual column, I exclude these 2 virtual columns and load data on to rest columns, virtual columns are filled based on the opinions of other 2 columns. The number of columns to select in the insert that is greater than 255, I am not able to load data using sql * more and sql developer, because they cannot manage this huge list of selection.

SQL * Plus fails with the error "too Long".
Developer SQL fails with "left/right parenthesis not found."
I failed to Toad, so I have not tried the same thing, don't know if the TOAD can handle this huge list of selection either.

My insert would look like below...

Insert into the target (t1, t2, t3... t757) select (t1, t2, t3... t757) source;

Can someone give me some directions please?

Thanks and greetings
Raja

You sure have a closing parenthesis at the end of the select statement? This seems to reproduce the error:

SQL> insert into t1 ( id,
  2  descr,
  3  name)
  4  select (id,
  5  descr,
  6  name
  7* from t
SQL> /
select (id,
          *
ERROR at line 4:
ORA-00907: missing right parenthesis

You can also remove the opening parens of the select statement, because it is not really necessary.

John

Tags: Database

Similar Questions

  • Gears - error when you try to insert values into a table with multiple columns

    Hello

    I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.

    I have:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?, ?)', [devName, devAge]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I get the error:

    net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.

    I use this reference: http://code.google.com/apis/gears/api_database.html

    Everything works if I have only one field as:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?)', [devName]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56

    Thank you

    Davy

    Yes, a SQLite database will persist between battery pulls.  The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.

    In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data.  This adds extra overhead fresh for the final, delete and insert first for a given table.  Instead, define and finalize your drawing before you create your table.  Once created, review the static schema.

    That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.

    See you soon,.

    Adam

  • Export an ADF table with default column order

    Hello

    Jdev 11.1.1.5.0

    We have ADF Table with column drag and drop option. Also we have implemented ADF Table with excelHTMl type of export.

    Everything works as expected. Only problem is if we try to exchange a few columns by drag-and - drop option and then export the table, we receive the order of the columns with brewing. But our demand is, the user must obtain the export with the initial order table by default.

    It would be great, if you can suggest an idea to export the ADF table with default column order.

    Thanks in advance,

    MSR.

    I realized the required functionality. We can restore the default order of the columns to aid

       Function richeTableau = this.getFetchResultsTable ();
       Iterator rItr = rTable.getChildren () .iterator ();
       {while (rItr.hasNext ())}
           ((RichColumn) rItr.next ()).setDisplayIndex(-1);
       }

    Then we can call the real export help feature

       queue the event via a JavaScript inserted into the page
       FacesContext context = FacesContext.getCurrentInstance ();
       Erks = ExtendedRenderKitService
       Service.getService (context.getRenderKit (), ExtendedRenderKitService.class);
       erks.addScript (context, "customHandler()");
  • Declare a type of table with multiple columns

    I have a table with a column of type, and I want to create one with two columns.

    My type is:
    create or replace type "NUMBER_TABLE" in the table of the number;

    And I use it in function:

    FUNCTION GetValues()
    return NUMBER_TABLE
    as
    results NUMBER_TABLE: = NUMBER_TABLE();
    Start
    Select OrderId bulk collect in: results from (select * from tbl_orders);
    -Other code...
    end;

    I want select it be like this:
    Select OrderId, OrderAddress bulk collect into: results from (select * from tbl_orders);

    How to do this?

    Is that what you are looking for:

    CREATE OR REPLACE TYPE two_col_rec AS OBJECT (empno NUMBER, ename VARCHAR2(10))
    /
    
    CREATE OR REPLACE TYPE two_col_table AS TABLE OF two_col;
    /
    
    CREATE OR REPLACE FUNCTION GetValues RETURN two_col_table AS
       results two_col_table := two_col_table();
    BEGIN
       SELECT two_col(empno, ename) BULK COLLECT INTO results FROM emp;
       --
       RETURN results;
    END;
    /
    show errors
    
  • How to create a table with editable column values.

    Hello world
    I think it's very simple, but I am unable to find how to do this. This is my requirement. I need to create a table with n columns and 1 line initially. the user must be able to enter data into this table and click of a button must insert the data into the database table. Also, there should be a button at the bottom of the table to add 1 line to the table.

    I know how to do the insertion of data, but can someone please let me know how to create a table which allows the user to enter data and how to create a line button Add 1?


    Thanks in advance!

    Raghu,

    Go through the tutorial of Toolbox Page & Advanced section of the Guide of the OFA table.

    Step 1 - you need to create EO & VO from this EO. This EO will be table of database where you want to insert the data.

    Step 2 - create an advanced table region. (See this section in table advanced for more details)

    Step 3 - attach this VO in the BC4J region advanced Table component.

    Kind regards
    GYAN

  • GetLength errors on CLOB. Retrieves the size of a table with CLOB columns

    Hello

    I try to find the size of a CLOB to a table column and get the error

    PLS-00306: wrong number or types of arguments in the call to "GETLENGTH.

    When you try to use dbms_lob.getlength. Here is the code


    declare
    number num.
    Start
    for rec in (select xmlupload from FILE_TABLE where file_table_id = 33635) loop
    NUM: = dbms_lob.getLength (rec.xmlupload);
    end loop;
    dbms_output.put_line (num);
    end;

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi


    I'm actually trying to find the size of a table with CLOB columns, is there an easy way to do this Besides using getlength and without having to contact the Administrators (they are outsourced)?

    It works fine on my computer, the version is also 10g.

    SQL> declare
      2  num number;
      3  begin
      4  for rec in (select cntnt from ims_toms_msge where rownum<3) loop
      5  num := dbms_lob.getLength(rec.cntnt);
      6  dbms_output.put_line(num);
      7  end loop;
      8
      9  end;
     10  /
    3837
    3837
    
    PL/SQL procedure successfully completed.
    

    You should check if xmlupload is the CLOB data type.
    In addition, if you just want to get the CLOB size, you can use LENGTH() as well, you will get the same result;

    SQL>  select length(cntnt), dbms_lob.getLength(cntnt) from ims_toms_msge where rownum<2;
    
    LENGTH(CNTNT) DBMS_LOB.GETLENGTH(CNTNT)
    ------------- -------------------------
             3837                      3837
    

    Published by: PhoenixBai on September 24, 2009 13:40

  • I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.

    I have a table with a city of the column. Values are 'delhi' and 'hyderabad '.

    as

    ID |   City

    ---------------------------

    1     |  Delhi

    ----------------------------

    2     |  Hyderabad

    Now, I have to update Delhi and Hyderabad Hyderabad with Delhi.

    How to do this?

    Hi Indi,

    (1) why do you want what it? Requirements of companies?

    (2) how much these values you want to reverse? Is it only "Delhi" and "Hyderabad", or there is a list, or other logic?

    Update your_table

    Set city = decode (lower (city), 'delhi', 'Hyderabad', 'hyderabad', 'Delhi')

    where lower (city) ('Delhi', 'hyderabad');

    Does that help?

  • Fill a table with two columns using a custom bean

    Hello

    Can you provide me or give me a link to an example of populating a table (with two columns) with a custom bean?

    Thank you

    TSPS

    Hello..
    I'm Jules Destrooper is what you want

    http://download.Oracle.com/docs/CD/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

    Hopes, will help you

  • Unique table with several columns or several tables split?

    What is the best.

    A table with multiple columns inside or divided into several tables. Why?
    How will the performance in the two scenarios?

    Hello

    user13024762 wrote:
    I have a table EMP that has column EMP_ID, EMP_NAME MGR_ID, MGR_NAME, SALARY, EXP_IN_MNTHS, EXP_IN_YRS... etc with multiple columns

    I have the following tables
    EMP-> EMP_ID, EMP_NAME

    Each row in the table emp thie represents a separate employee. I guess other columns in the emp table might be birth_date, social_security_number and status (by example, 'Active', 'Leave', 'complete'). Here's what an employee has (at least) one of. If there is a one-to-many relationship between an employee and an attribute, then you probably want another table for this attribute.

    BISHOP-> EMP_ID, MGR_ID, MGR_NAME

    There is a one-to-many relationship between employees and managers? In other words, an employee may have 2 or more managers? If Yes, then you need another table.
    If there is only a one-to-one relationship between employees and managers (in other words, if an employee is never more than 1 Manager) so why don't you just have a mgr_id column in the emp table?
    Managers are also used for? (This is often the case, as in scott.emp and hr.employees.) If so, do not store their names in the EME and tables of mgr. Store name (and date of birth and other information) in the table emp only and, if you need a table of Bishop, just the emp_id and mgr_id column.

    SAL-> EMP_ID, SALARY

    There is a one-to-many relationship between the employees and wages? In other words, an employee may have 2 or more treatments? If so, how will you use the values? Is a special treatments in some way, as it will be used more often than others? (In other words, you may have a current and past wages salary, but the last wages are rarely used.)
    If you never have more than 1 salary for a given employee, why not just have a sal column in the emp table?

    EXP-> EMP_ID, EXP_IN_MNTHS, EXP_IN_YRS

    There is a one-to-many relationship between the employees and what whether you store in this table?

    etc. with more tables

    What is the best based on

    (1) performance and data recovery
    (2) ease of use
    (3) maintainability

    A one-to-many relationship requires an additional table. If an employee can have up to 3 managers, don't have mgr1, mgr2 and mgr3 columns in the emp table. Use a separate table, with up to 3 lines for the same employee, instead.
    For 1-1 relationships, it is usually best to not have separate tables.

  • Table with 300 columns

    While talking with a friend, he told me that sometimes he uses tables with 300 columns that will be available only once for the extraction of information. For me, it's a little strange because 300 columns looks like a large number of columns for me...

    Have tables with columns as is common practice in the data warehouse? If Yes, can you explain to me on what situations, this can happen and how often?

    Concerning

    We have tables with columns of cca 150.

    You should know that we don't talk to relational systems which are standardized. Its common practice when building data warehouse. Number of columns in the tables will depend on the complexity and the size of your warehouse and the number, size and complexity of your source systems.

    Point is that even now, when the data warehouse is "done", we still add/remove columns changes to warehouse such as changing the source systems.

  • By selecting the table with UDT columns

    Hello!
    I have:
    create type j_t as object (
      num number,
      str varchar2(10)
    );
    create table j_table (
      ident number,
      j     j_t
    );
    insert into j_table (ident, j) values (1, j_t(1, 'one'));
    How can I select from table j_table to the output as:
    ident num str
    ----- --- ---
        1   1 one

    Is there something similar to ' SELECT * FROM ' for use with objects?

    You can create an additional array type, for example j_t_tab:

    SQL> create type j_t as object (
      num number,
      str varchar2(10)
    )
    /
    Type created.
    
    SQL> create type j_t_tab as table of j_t
    /
    Type created.
    
    SQL> create table j_table (
      ident number,
      j     j_t
    )
    /
    Table created.
    
    SQL> insert into j_table (ident, j) values (1, j_t(1, 'one'))
    /
    1 row created.
    
    SQL> select ident, t.* from j_table j, table(j_t_tab(j)) t
    /
         IDENT        NUM STR
    ---------- ---------- ---------------
             1          1 one
    1 row selected.
    

    ?

  • inserting multiple rows of another table with incremented recordid

    Hi all

    I HAVE TWO TABLES:

    CREATE TABLE TEMP_TEST1)
    NUMBER OF RECID,
    TESTCHAR VARCHAR2 (500)
    )

    AND

    CREATE TABLE TEMP_TEST2)
    TESTCHAR VARCHAR2 (500)
    )

    Both the table contains data in it. I want to insert data from TEMP_TEST2 in TEMP_TEST1 with RECID incremented for each record, which must be greater than max (RECID) of TEMP_TEST1.
    PS: I have to query insert only, I cannot make changes in the structure of table or RECID of TEMP_TEST1 is not automatically incremented.
    Please suggest a query that selects the record of TEMP_TEST2 and TEMP_TEST1 insert with recid incremented for each record.


    Thank you.
    SQL> insert into TEMP_TEST2(TESTCHAR)
      2  select 'Test'||level from dual connect by level < 10
      3  /
    
    9 rows created.
    
    SQL>
    SQL>
    SQL> insert into TEMP_TEST1(RECID,TESTCHAR)
      2  select (select nvl(max(RECID),0) from TEMP_TEST1) + rownum, t2.TESTCHAR
      3  from TEMP_TEST2 t2
      4  /
    
    9 rows created.
    
    SQL>
    SQL> select * from TEMP_TEST1
      2  /
    
         RECID TESTCHAR
    ---------- ----------
             1 Test1
             2 Test2
             3 Test3
             4 Test4
             5 Test5
             6 Test6
             7 Test7
             8 Test8
             9 Test9
    
    9 rows selected.
    
    SQL> insert into TEMP_TEST1(RECID,TESTCHAR)
      2  select (select nvl(max(RECID),0) from TEMP_TEST1) + rownum, t2.TESTCHAR
      3  from TEMP_TEST2 t2
      4  /
    
    9 rows created.
    
    SQL>
    SQL> select * from TEMP_TEST1
      2  /
    
         RECID TESTCHAR
    ---------- ----------
             1 Test1
             2 Test2
             3 Test3
             4 Test4
             5 Test5
             6 Test6
             7 Test7
             8 Test8
             9 Test9
            10 Test1
            11 Test2
    
         RECID TESTCHAR
    ---------- ----------
            12 Test3
            13 Test4
            14 Test5
            15 Test6
            16 Test7
            17 Test8
            18 Test9
    
    18 rows selected.
    
    SQL>
    

    Good bye
    DPT

  • Jdev12.1.3: Remember last page selected in a table with scrollPolicy = "page".

    Hi experts,

    I have a page with a table with scrollPolicy = "page". When the user double-clicks any folder, open a new page with details.

    The user requires that, when close details and return to the page that contains the table, there is still the same selected page (IE page 5), "scroll" not automatically on page 1.

    Any suggestions?

    Thank you very much
    Jose.

    You can see this example: http://andrejusb.blogspot.com/2014/03/adf-11g-ps6-table-pagination-and.html

    Dario

  • error on 'create a table in select... '. "table with nested columns

    My Oracle 11.1 database, I have a problem with the nested table.

    on table with script
    CREATE TABLE TXV.IS_PODACI209
    (
      ID_OBJEKTA_IDENTIFIKACIJA  NUMBER(10),
      ID_OBJEKTA                 NUMBER(20),
      DATUM                      TIMESTAMP(6),
      TZ                         NUMBER(3),
      DATA1                      NUMBER(10),
      DATA2                      NUMBER(6),
      DATA3                      NUMBER(10),
      DATA4                      NUMBER,
      DATA5                      TXV.T_NTCIP_ILLUM_TABLE,
      DATA6                      NUMBER(10)
    )
    NESTED TABLE DATA5 STORE AS IS_PODACI209_STORE_TABLE
    TABLESPACE TXV_DATA
    PARTITION BY RANGE (DATUM)
    (  
      PARTITION P_201012 VALUES LESS THAN (TIMESTAMP' 2011-01-01 00:00:00')
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA,  
      PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA
    )
    NOCOMPRESS 
    NOCACHE
    NOPARALLEL
    MONITORING;
    
    
    CREATE INDEX TXV.IDX_IS_PODACI209_KOMPLEKS ON TXV.IS_PODACI209
    (ID_OBJEKTA_IDENTIFIKACIJA, ID_OBJEKTA, DATUM)
      TABLESPACE TXV_DATA
    LOCAL (  
      PARTITION P_201012
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA,  
      PARTITION MAXX
        LOGGING
        NOCOMPRESS 
        TABLESPACE TXV_DATA
    )
    NOPARALLEL;
    that has a nested type column:
    CREATE OR REPLACE TYPE TXV.t_ntcip_ILLUM_FMT as object
    (  BRIGHTNESS_LEVEL FLOAT
    ,   PHOTOCELL_DOWN   FLOAT
    ,   PHOTOCELL_UP  FLOAT
    );
    and I create a table (to copy table partitions in a third table) step to help:
    CREATE TABLE TXV.IS_PODACI209_STAGE NESTED TABLE DATA5 STORE AS IS_PODACI209_STAGE_1 AS SELECT * FROM TXV.IS_PODACI209 WHERE 1=2
    The problem is when I try to move using the partition:
    ALTER TABLE TXV.IS_PODACI209 EXCHANGE PARTITION P_201012 WITH TABLE IS_PODACI209_STAGE EXCLUDING INDEXES WITHOUT VALIDATION UPDATE GLOBAL INDEXES
    I get an error:
    ALTER TABLE TXV.IS_PODACI209
      EXCHANGE PARTITION P_201012
      WITH TABLE IS_PODACI209_STAGE
      EXCLUDING INDEXES
      WITHOUT VALIDATION
      UPDATE GLOBAL INDEXES
    Error at line 3
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
    but these tables are the same...

    someone had such a problem?

    concerning

    I think the UPDATE GLOBAL INDEXES is the origin of the problem.

    Try this,

    ALTER TABLE IS_PODACI209 EXCHANGE PARTITION P_201012 WITH TABLE IS_PODACI209_STAGE EXCLUDING INDEXES WITHOUT VALIDATION 
    

    Rebuild the indexes manually.

    And if I see your profile, you

    Messages total: 25
    Total issues: 16 (* 14 pending *)

    Always mark a thread as answered once you get the answer. It can save a lot of time for volunteers.

    G.

  • Insert server behavior into two tables with ASP.

    How do I change the server behavior code INSERT to insert records into several tables using ASP? Information inserted into the first table includes the customer profile, including the legal name, name and surname. What I can accomplish easily using the server behavior. In the second table I want to insert hidden value in a field that corresponds to the value of the current customerID, as well as the model number of the item purchased. Be very specific that I'm not too familiar with the scripts.

    The standard insert behavior cannot be easily changed to handle multiple
    tables. However there is a very simple tutorial on www.charon.co.uk on the way
    to deal with.

    --
    Paul Whitham
    Certified Professional Dreamweaver MX2004
    Adobe Community Expert - Dreamweaver

    Valleybiz Web design
    www.valleybiz.NET

    "aonefun" wrote in message
    News:emsn18$23F$1@forums. Macromedia.com...
    > How do I change the server behavior code INSERT to insert records in
    > more
    > as a table using ASP? Information inserted into the first table
    > includes a
    > Customer profile, including the company name, name and surname. What I can
    > accomplish easily using the server behavior. In the second table I'd
    > as
    > to insert a hidden field value that is equal to the value of the current
    > customerID, as well as the model number of the item purchased. Please be very
    > specific
    > as I am not too familiar with the scripts.
    >

Maybe you are looking for

  • Finder requiring frequent raises

    The finder in my iMac, suddenly began to showing no reaction. In the middle of a search file or some of these transactions, it will freeze, does not not to mouse clicks, become transparent on the toolbar so that the background shows through. Then, it

  • iCloud "Can't delete items" Server error

    iMac, iPad and iPhone; Connected to iCloud > Photos, I'm trying to remove the unwanted pictures, but I get the following error message?

  • DCL passed to the GPIB-VXI/C

    What happens to VXI boards plugged into VXI backplane when a GPIB-VXI/C (p/n 777126) receives DCL of the computer?  Do the Board reset VXI, GPIB-VXI/C doesn't know the DCL, or VXI boards ignore everything that is transmitted to their or something els

  • Problems with the installation of Vista Home Premium on XP Professional

    Original title: Reinstall Vista Home Premium on Boot up Vista reinstall at startup My computer had Windows Vista Home Premium top. I installed XP Pro top. I want to reinstall Vista Home Premium back. When I restart my computer to reinstall, it doesn'

  • How to install a CanoSan Lide 100 scanner to my laptop with Windows XP?

    HOW TO CONNECT THE SCANNER TO A LAPTOP MODEL HP? How to connect a CanoSan Lide 100 to a hp laptop windows xp computer?