Insertion XMLAgg large output in a table with a CLOB column

Hello

I need to fill a CLOB column in a table with the output of a query select using XMLAgg which returns a string length exceeds the maximum length of the SQL 32767octets.

The table I ask has 300,000 lines I need to create an XML file. When I apply the query below (without XMLAgg) I get 300 000 lines that each of the 134 characters each. However, when I add the XMLAgg I can't select the results as XMLAgg concatenates my 300,000 lines in a single line, where a length of string is too long for SQL.

SELECT (XMLElement ("line", XMLELEMENT ('cell', XMLATTRIBUTES ('XML_TAG_1' "colName"), attribute1)
XMLELEMENT ('cell', XMLATTRIBUTES ('XML_TAG_2' "colName"), attribut2)
XMLELEMENT ('cell', XMLATTRIBUTES ('XML_TAG_3' "colName"), attribut3))
)
of XML_TAGS_TABLE
-Produces 300,000 lines like below
< row > < cell colName = "XML_TAG_1" > 12345 < / cell > < cell colName = "XML_TAG_2" > abcdef < / cell > < cell colName = "XML_TAG_3" > 123xyz < / cell > < / row >

With this in mind, I created a temporary table (TEMP_TAB_TEST) with a column called XML_ROW that is a CLOB. Applying XMLAgg in the above query, I would get 300,000 lines concatenated into a string. I need to get the single string output in the XML_ROW (CLOB) column XMLAgg while I can then convert them to the XML file.

I don't see how I can use XMLAgg due to the length of the output it produces? Is there a way I can fill the column clob using the XMLAgg is the result of a PL/SQL package / block Anon?

Thank you very much
Simon.

It works for me:

CREATE TABLE TESTCLOB (ID NUMBER, DATA CLOB);

insert into testclob (
  id,
  data
) values (
  1,
  (SELECT XMLTYPE.getClobVal(XMLAGG( XMLElement("row", XMLELEMENT("cell", XMLATTRIBUTES('XML_TAG_1' COL1),attribute1)
                                    ,XMLELEMENT("cell", XMLATTRIBUTES('XML_TAG_2' COL2) ,attribute2)
                                    ,XMLELEMENT("cell", XMLATTRIBUTES('XML_TAG_3' COL3),attribute3))
                                   )
                             )
     from (SELECT 'XXXXX' attribute1, 'xxxxxx' attribute2, 'yyyyyyy' attribute3 from dual connect by level<1000000)
  )
);

SELECT ID, DBMS_LOB.GETLENGTH(DATA) FROM TEXTCLOB;

ID                     DBMS_LOB.GETLENGTH(DATA)
---------------------- ------------------------
1                      118999881                

Tags: Database

Similar Questions

  • Importing data with impdp table with 3 new columns

    Hello

    Is it possible to import data with impdp in tables with 3 new columns?

    Kind regards

    William

    To do this, I use this method:

    Add the three columns in the source table and create the package:

    CREATE OR REPLACE PACKAGE DATAPUMP_TECH_COLS

    IS

    FUNCTION SET_DML_DATE (p1 in TIMESTAMP)

    BACK TO TIMESTAMP;

    FUNCTION SET_DML_TYPE (p2 in VARCHAR2)

    RETURN VARCHAR2;

    FUNCTION SET_DML_SCN (p3 in NUMBER)

    RETURN NUMBER;

    END DATAPUMP_TECH_COLS;

    /

    CREATE OR REPLACE PACKAGE BODY SYS. DATAPUMP_TECH_COLS

    IS

    FUNCTION SET_DML_DATE (p1 in TIMESTAMP)

    RETURNS THE TIMESTAMP

    IS

    BEGIN

    SYSDATE RETURN;

    END;

    FUNCTION SET_DML_TYPE (p2 in VARCHAR2)

    RETURN VARCHAR2

    IS

    BEGIN

    RETURN ' ';

    END;

    FUNCTION SET_DML_SCN (p3 in NUMBER)

    RETURN NUMBER

    IS

    BEGIN

    RETURN 0;

    END;

    END;

    /

    Export a table with remap_data

    expdp = TEMP_DIR PARALLEL = 8 TABLES directory is PIVOTMAT2. ACCTG_LINE LOGFILE = expdp_acctg.log = COMPRESSION STATISTICS ALL EXCLUDE =.

    DUMPFILE = ACCTG1.dmp, ACCTG2.dmp, ACCTG3.dmp, ACCTG4.dmp, ACCTG5.dmp, ACCTG6.dmp, ACCTG7.dmp, ACCTG8.dmp REUSE_DUMPFILES = YES.

    REMAP_DATA = PIVOTMAT2. ACCTG_LINE. DML_TYPE:SYS. DATAPUMP_TECH_COLS. SET_DML_TYPE.------

    REMAP_DATA = PIVOTMAT2. ACCTG_LINE. DML_DATE:SYS. DATAPUMP_TECH_COLS. SET_DML_DATE.------

    REMAP_DATA = PIVOTMAT2. ACCTG_LINE. DML_SCN:SYS. DATAPUMP_TECH_COLS. SET_DML_SCN

    Import table

    Impdp "" / as sysdba "" DIRECTORY = SRC_PIVOT TABLE_EXISTS_ACTION = TRONQUER REMAP_SCHEMA = PIVOTMAT2:STGPIV.

    DUMPFILE = ACCTG1.dmp, ACCTG2.dmp, ACCTG3.dmp, ACCTG4.dmp, ACCTG5.dmp, ACCTG6.dmp, ACCTG7.dmp, ACCTG8.dmp PARALLEL = 8

    to complete the removal of the collar if necessary.

  • How to create a table with two unique columns

    How to create a table with two unique columns. I use the following syntax below and I get the error message such unique or primary key already exists.

    create the table COPQ_WORKCELL_GOAL
    (
    Type_id varchar2 (4) NOT NULL UNIQUE,
    Tyle_Location varchar2 (30) NOT NULL UNIQUE,
    Type_Description varchar2 (20).
    KEY elementary SCHOOL (Type_id)
    );

    Use 1 or the other column type_id;

    create table COPQ_WORKCELL_GOAL
    (
      Type_id varchar2(4),
      Tyle_Location varchar2(30) NOT NULL UNIQUE,
      Type_Description varchar2(20),
      PRIMARY KEY (Type_id)
    );
    
    Table created
    drop table COPQ_WORKCELL_GOAL;
    
    Table dropped
    create table COPQ_WORKCELL_GOAL
    (
      Type_id varchar2(4) primary key,
      Tyle_Location varchar2(30) NOT NULL UNIQUE,
      Type_Description varchar2(20)
    );
    
    Table created
    
  • How to INSERT a SELECT statement with a GROUP BY clause on a table with an IDENTITY column?

    n an application, I intend to truncate and insertion on a 12 c Oracle database, but have found this problem with a IDENTITY column. Even if the INSERT... SELECT statement works on most SELECT uses I tried, if this statement was also a GROUP BY clause, it does not work, delivering a "ORA-00979: not a GROUP BY expression ' complaint. Some examples of code:

    create table aux ( owner_name varchar2(20), pet varchar2(20) ); 

    insert into aux values ('Scott', 'dog');

    insert into aux values ('Mike', 'dog');

    insert into aux values ('Mike', 'cat');

    insert into aux values ('John', 'turtle'); 


    create table T1 (

    id number generated always as identity,

    owner_name varchar2(20),

    pet_count number );

    select owner_name, count(*) as pet_count from aux group by owner_name; -- works just fine

    insert into T1 (owner_name, pet_count) select owner_name, count(*) as pet_count from aux group by owner_name; -- doesn't work

    The select statement works by itself, but it fails as an INSERT... SELECT statement.

    Appreciate the help!

    Looks like a bug. You must open the SR with Oracle. Meanwhile, you could materialize select:

    SQL > insert into T1 (owner_name, pet_count)
    2 with t as (select / * + materialize * / owner_name, count (*) as pet_count to the owner_name group)
    3. Select owner_name, pet_count t
    4.

    3 lines were created.

    SQL > select * from t1;

    ID OWNER_NAME PET_COUNT
    ---------- -------------------- ----------
    1 John                          1
    Scott 2 1
    3 Mike                          2

    SQL >

    Keep in mind index THAT MATERIALIZE is undocumented.

    SY.

  • Not how to show a part of online data in a table in another table with even no column?

    I need to display the data from certain rows in a table in another table with the same numbers of columns and main table must be disabled. Could someone advice how to do this?    Data in the table are from the microprocessor and is intended the user can see and edit only some data.

    If someone can show me some advice, it will be a great help.

    Kind regards

    Annemariehoeven

    Disable a table: SetInputMode (panelHandle, controlID, 0);  ('1' to re - activate).

    Hide a table: SetCtrlAttribute (panelHandle, controlID, ATTR_VISIBLE, 0); ('1' to show it again).

    These commands are valid for each type of control.

    To extract values from the table, you can just use GetTableCellVal or GetTableCellRangeVals: If the range of cells has the same data type, you can use the second command which is faster; If the cells are different (for example digital and channels) you must solve each of them individually. The use of the Clipboard doesn't have this limitation.

  • Bug: 4.1.1 as a table with all the columns of conditionals

    I need to make all the columns in a tabular form conditional because in some situations the editable elements must not appear. For some reason, simply change the columns in the form of work conditional stop valves, the ApplyMRU/ApplyMRD process works but not action lines changed. I can't understand why all or of a workaround.

    You can easily replicate this in 4.1.1 creating a form of table with the wizard by selecting a column in the form. Then subordinate the selector colunn line and your editable column using the expression 1 = 1 plsql. The form is displayed all the same with these real conditions but it does not work. Weird how?

    Rod West

    Rod,

    In your scenario, the tabular rendering engine may not place the hidden status columns, internal tabular form in your form, i.e. the columns that contain amounts of control, etc.. The logic that puts these columns search the last column unconditional, visible in the form of your table and includes hidden fields here. If you need at least a column that is always indicated to do so. This can be an empty column. I filed a bug (#13881803) to do this, so we can look to improve this logic.

    Kind regards
    Marc

  • Difference between an XMLType table and one table with an XMLType column?

    Hi all

    Still trying to get my mind on all that XML stuff.

    Can someone explain briefly the difference between:
    create table this_is_xmltype_tab of xmltype;
    and
    create table this_is_tab_w_xmltpe_col(id number, document xmltype);
    What are the advantages and disadvantages of each solution? How are they really different?

    Thank you

    -Mark

    Sorry Mark, as far as I know it is not a real difference despite the fact that you can use the table with the column (ID), probably more effective for document-focused while driving the query via the ID column and anything else I can think off automatically about XMLType contra XMLType table columns is that (as far as I KNOW) you can not use a column of XMLType to shred the data into it via WebDAV o FTP. But then again I never really tried to do an XMLType column-based. Alternatives, for example, a binary XML column begins with a column of $ sys_nc_oid which is indexed, so in principle you shouldn't need an ID (number) column that has an index (a read also on http://www.liberidu.com/blog/?p=494). If there has been non-null that you could use this index for document oriented applications.

  • Grant table with the nested column.

    Hello

    I looked for an answer to this question, but I couldn't find it. So, here goes. I am trying to grant select on a table with a column that is nested in another user and still will not work select it. Here is an example.

    FIRST_USER@TST > create type test_object as an object (ref01 varchar2 (3));
    0 m

    Type of creation.

    FIRST_USER@TST > create type test_type is the table of the test_object;
    0 m

    Type of creation.


    "afiedt.buf" 3 lines, 100 characters

    1 create table table1 (x varchar2 (1), y test_type)
    2 * store table is nested as type1_nt back as a value
    FIRST_USER@TST > /.

    Table created.

    FIRST_USER@TST > grant select on table1 to SECOND_USER;

    Grant succeeded.

    SECOND_USER @TST > select * from FIRST_USER.table1;
    Select * from FIRST_USER.table1
    *
    ERROR on line 1:
    ORA-01031: insufficient privileges


    I don't know I'm missing something. I may have to give the grant another way maybe? Help, please.

    Thank you.

    See http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14260/adobjmng.htm#sthref786.

    You must grant execute of the consumer on the underlying type.

  • How repeat/option output values from XML in the CLOB column?

    Environment:


    Oracle 11.2.0.3 EE on Solaris


    Very much a newbie XML but try.  :-)


    I have a table with the XML stored in a CLOB (no, I can't imagine the environment but I live here).


    I need to display the data in a flat file format.  Some of the data is both optional and possibly repeat if present.


    Here's a fun sample data:


    "< res: customers xmlns: res = ' http://www.whatever.com/response ">

    < res: lastName > SMITH < / res: lastName >

    < res: firstName > JENNIFER < / res: name >

    < res: Extras >

    < res: Extra >

    HOME < res: phoneType > < / res: phoneType >

    555-555-5555 < res: phoneNumber > < / res: phoneNumber >

    < / res: Extra >

    < res: Extra >

    < res: phoneType > MOBILE < / res: phoneType >

    666-666-6666 < res: phoneNumber > < / res: phoneNumber >

    < / res: Extra >

    < / res: Extras >

    < res: lastName > JONES < / res: name >

    < res: firstName > ROBERT < / res: name >

    < res: Extras >

    < res: Extra >

    HOME < res: phoneType > < / res: / phoneType >

    123-456-7890 < res: phoneNumber > < / res: phoneNumber >

    < / res: Extra >

    < / res: Extras >

    < res: lastName > MURPHY < / res: lastName >

    < res: firstName > SEAN < / res: name >

    < / res: customers >

    I'm trying to get my output to look like this:


    Last name first name model number

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

    JENNIFER SMITH 555-555-5555 HOME

    SMITH JENNIFER MOBILE 666-666-6666

    HOME OF ROBERT JONES 123-456-7890

    SEAN MURPHY


    I don't know how to get the repeated lines printed and I don't know how to get the printed line that does not contain the optional data.


    Here is the script that I have developed so far.  With my actual data I can get the printed name and I can get phone information printed out but only to the exclusion of the names. I was unable to get the data if the optional data is not present.


    I tried to refer to information from phone and then back up to 2 levels for the information of name but I receive: ORA-19110: no support for XQuery expression


    Select x.*

    client m.

    XMLTable (XMLNamespaces ('http://www.whatever.com/response' as "res") )

    , ' / res: clients/res: res/Extras: Extra '

    by the way of xmltype (m.CUSTOMER_XML)

    columns

    lastName varchar2 (80) WAY '... /... / res: LastName'

    , name varchar2 (30) WAY '... /... /FirstName'

    , varchar2 (30) phoneType PATH '.'

    , number of phone varchar2 (30) PATH '.'

    ) x

    Any help is greatly appreciated.


    -gary

    Hi Gary,.

    Are you sure the sample XML code correspond to your actual data?

    The second query expected error because the PATH expression refers to multiple targets.

    If it's really like that, the XML structure is not very easy to deal with. It would be wise to have a container element enclosing each customer information, like this:

    http://www.whatever.com/response">

    SMITH

    JENNIFER

    HOME

    555-555-5555.

    MOBILE

    666-666-6666.

    ...

    To answer your main question, you can use an OUTER JOIN to include data that do not have Extras.

    Using your original sample XML, something like this works for me:

    SQL > select x.lastName

    2, x.firstName

    3, y.phoneType

    4, y.phoneNumber

    client 5 m

    6, XMLTable)

    7 XMLNamespaces (default 'http://www.whatever.com/response')

    8, ' for $i in/clients/first name

    9 return element {} r

    $i 10 / following - sibling:Extras [1]

    11, $i/next - sibling:firstName [1]

    12          , $i

    13          }'

    14 passage xmltype (m.CUSTOMER_XML)

    15 columns

    lastName 16 varchar2 (80) PATH "lastName."

    17, firstName varchar2 (30) PATH "first name".

    18, extras xmltype PATH "Extras."

    (19) x

    20, XMLTable)

    21 XMLNamespaces (default 'http://www.whatever.com/response')

    22, ' / extras/Extra.

    23 passage x.extras

    24 columns

    VARCHAR2 (30) 25 phoneType PATH "phoneType".

    26, phoneNumber varchar2 (30) PATH "phone".

    27       ) (+) y

    28;

    LASTNAME FIRSTNAME PHONETYPE PHONENUMBER

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

    JENNIFER SMITH 555-555-5555 HOME

    SMITH JENNIFER MOBILE 666-666-6666

    HOME OF ROBERT JONES 123-456-7890

    SEAN MURPHY

  • Insert the problem using a SELECT table with an index by TRUNC function

    I came across this problem when you try to insert a select query, select returns the correct results, but when you try to insert the results into a table, the results are different. I found a work around by forcing a selection order, but surely this is a bug in Oracle as how the value of select statements may differ from the insert?

    Platform: Windows Server 2008 R2
    11.2.3 Oracle Enterprise Edition
    (I've not tried to reproduce this on other versions)

    Here are the scripts to create the two tables and the data source:
    CREATE TABLE source_data
    (
      ID                 NUMBER(2),
      COUNT_DATE       DATE
    );
    
    CREATE INDEX IN_SOURCE_DATA ON SOURCE_DATA (TRUNC(count_date, 'MM'));
    
    INSERT INTO source_data VALUES (1, TO_DATE('20120101', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120102', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120103', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120201', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120202', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120203', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120301', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120302', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120303', 'YYYYMMDD'));
    
    CREATE TABLE result_data
    (
      ID                 NUMBER(2),
      COUNT_DATE       DATE
    );
    Now, execute the select statement:
    SELECT id, TRUNC(count_date, 'MM')
    FROM source_data
    GROUP BY id, TRUNC(count_date, 'MM')
    You should get the following:
    1     2012/02/01
    1     2012/03/01
    1     2012/01/01
    Now insert in the table of results:
    INSERT INTO result_data
    SELECT id, TRUNC(count_date, 'MM')
    FROM source_data
    GROUP BY id, TRUNC(count_date, 'MM');
    Select the table, and you get:
    1     2012/03/01
    1     2012/03/01
    1     2012/03/01
    The most recent month is repeated for each line.

    Truncate your table and insert the following statement and results should now be correct:
    INSERT INTO result_data
    SELECT id, TRUNC(count_date, 'MM')
    FROM source_data
    GROUP BY id, TRUNC(count_date, 'MM')
    ORDER BY 1, 2;
    If someone has encountered this problem before, could you please let me know, I don't see what I make a mistake because the selection results are correct, they should not be different from what is being inserted.

    Published by: user11285442 on May 13, 2013 05:16

    Published by: user11285442 on May 13, 2013 06:15

    Most likely a bug in 11.2.0.3. I can reproduce on Red Hat Linux and AIX.

    You can perform a search on MOS to see if this is a known bug (very likely), if not then you have a pretty simple test box to open a SR with.

    John

  • Insert a picture into a Word table with report generation tool.

    I was wondering if it is possible to use the report generation tool to place an image in the cell of a table in a Word document?

    Hello

    Yes, you can do this by using the Word change cell VI under reporting > specific word > Word tables in your diagram of function pallet blocks.  After you create a table, you can modify specific cells and send the file path of the image saved on your computer to that specific cell.  I have set up an example that I have attached here as well to help you with this.

  • Insertion of an element with a css in muse html. This is a table with a fixed column in dreamweaver, I wrote, but I can't make it work.

    is there a way to do this miss me I tried to insert html objects, but not luck.

    Your code works well. A couple of things must be changed much.

    In your HTML code, remove the first line:

    Add your css to your CSS in the Page Properties in the Meta tab in the Head section. But you must also add the Style tag in your css. It would therefore be:

  • A better way to treat the form as a table with the variable column type?

    I wanted to make a column to return according to the status of a flag column as readonly. I have a column defined as follows in the report query.

    Decode (sys_flag, 'Y', APEX_ITEM. DISPLAY_AND_SAVE 3, TYPE_CODE, APEX_ITEM. SELECT_LIST_FROM_LOV (3, TYPE_CODE, 'LOV_TYPE_CODE_LOV')) AS TYPE_CODE

    To get the SRM process noting that column, I had to put this 'band of HTML code' to 'No', then the column attributes, I put:
    "Expression HTML" to "#TYPE_CODE #
    ' Display under "to"text display (saves the State).

    And then it took me to get new lines of work:
    "Default of Type" to "Expression of PL/SQL.
    'Default' to APEX_ITEM. SELECT_LIST_FROM_LOV (3, NVL(:P18_TYPE_CODE,'LOV_TYPE'), NULL, 'LOV_TYPE_CODE_LOV', ' NO')

    This makes large, however submit that it seems that the checksum of line used by MRU included the raw HTML generated by the APEX_ITEM package and not just the value of the column. I worked around this by including an element hidden checksum and creating a process that replaces the checksum generated automatically with my custom.

    Is there a better way to intercept this checksum, preferably before it is rendered on the page? I now hide the sum of hidden HTML control in the output HTML of another column, so it's a bit ugly. If not, is there an easier way to achieve what I'm looking for? I tried several combinations, and it seems to work better. It's just a shame there's no way to have a standard hidden column included in the SRM process.

    Hello

    I tried different possibilities and seems to run the following:

    Create a report questioning in NORMAL SQL function to help:

    SELECT
    APEX_ITEM.HIDDEN(1,EMPNO) || APEX_ITEM.TEXT(2,ENAME) ename,
    CASE WHEN DEPTNO = 10 THEN
     APEX_ITEM.HIDDEN(3, SAL) || SAL
    ELSE
     APEX_ITEM.TEXT(3, SAL)
    END SAL,
    EMPNO,
    DEPTNO || APEX_ITEM.MD5_CHECKSUM(ENAME, SAL) DETPNO
    FROM EMP
    

    Do not specify something special for column definitions.

    Create a button that submits the page.

    Create a PL/SQL process that runs "On submit - after calculations" and Validations, triggered by this button and using the following code:

    BEGIN
    APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:EMP:EMPNO,1:,|ENAME,2:SAL,3');
    END;
    

    I've done here: http://htmldb.oracle.com/pls/otn/f?p=55041:35

    Any element with the value of DEPTNO 10 has the value SAL, read-only, as otherwise it's editable. This is done by creating a hidden input field for the actual value, followed by the text version OR by creating a single entry field. This ensures that we have the correct number of SAL elements on the page.

    APEX_ITEM. MULTI_ROW_UPDATE is the "manual" version of the MRU that you would normally get with a form of table and works for above normal as sql based query reports. The format of this very strict is that you must always allow for two primary keys. See the text of presentation here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDFDACC

    Andy

  • Flashback work table with a deleted column

    Oracle Database 10 g Express Edition Release 10.2.0.1.0 - product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    Hello

    I have the following problem.

    I accidentally dropped a column containing the data of a table and to restore the state table, it was before I did.

    I found a reference on the internet which States that you can use flashback to retrieve a table to a set in the past point, even if you deleted a column.
    Flashback Table
    
    Just as the flashback query helps to retrieve rows of a table, FLASHBACK TABLE helps to restore the state of a table to a certain point in time - even if a table structure change has occurred since then. The following simple command will take us to the table state at the specified timestamp:
    
    SQL> FLASHBACK TABLE Employee TO 
               TIMESTAMP ('13-SEP-06 8:50:58','DD-MON-YY HH24: MI: SS');
    
    Reference - http://www.orafaq.com/node/872
    My DBA has sent me the following information;
    Oracle Metalink note  
    
    Limitations and Restrictions on Flashback Table :
    
    Flashback Table operations are not valid for the following type objects: tables that are part of a cluster, materialized views, Advanced Queuing (AQ) tables, static data dictionary tables, system tables, remote tables, object tables, nested tables, or individual table partitions or subpartitions.
    
    The following DDL operations change the structure of a table, so that you cannot subsequently use the TO SCN or TO TIMESTAMP clause to flash the table back to a time preceding the operation: upgrading, moving, or truncating a table; adding a constraint to a table, adding a table to a cluster; modifying or dropping a column; adding, dropping, merging, splitting, coalescing, or truncating a partition or subpartition (with the exception of adding a range partition).
    
    You cannot rollback a FLASHBACK TABLE statement. However, you can issue another FLASHBACK TABLE statement and specify a time just prior to the current time. Therefore, it is advisable to record the current SCN before issuing a FLASHBACK TABLE clause.
    Then my return of flame using DBA in this situation or not?

    Ben

    >
    Is the ORAFAQ, a site with a good reputation for more information.
    >
    I found that it is quite reliable. But when ANY site talking about a newly introduced feature, it must trigger at least one indicator "attention". There may be so many variables affecting the functioning of a new feature or is used unless you see a working example, you must create your own test case.

    As I said some things, like your question above, can be easily verified, so there is no reason to rely on any document to see if it works.
    >
    Is anyway to cancel this kind of thing or it is unrecoverable?
    >
    Almost nothing is "sunk", if you have the right type of backup. For a deleted column, you have an export of the table before the fall.

    Recommended for small changes DDL (for example related to an incremental update) is to take an export of the affected table.

  • ORA-00904 on CREATE TABLE with a virtual column based on the XMLTYPE content

    Hello

    This is another one for the gurus of the syntax...

    Try the following, fails with ORA-00904: "MESSAGE". "' GETROOTELEMENT": invalid identifier
    CREATE TABLE XML_TEST_VIRT
      (
       MSG_TYPE         GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
      )
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /
    While it succeeds
    CREATE TABLE XML_TEST_VIRT
      (
       MSG_TYPE         GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL,
       MESSAGE  XMLTYPE             NOT     NULL,
       IE906    XMLTYPE             DEFAULT NULL
      )
       XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML
       XMLTYPE COLUMN IE906   STORE AS SECUREFILE BINARY XML
    /
    The GETROOTELEMENT from SYS member function. XMLTYPE is stated as "PARALLEL_ENABLE DETERMINISTIC" the method called is not the problem, as evidenced by the 2nd case.
    Using the MESSAGE column that is of type XMLTYPE directly seems to be the problem. But the question is "why." The result of the EXTRACT function is of type XMLTYPE and call his works of members, the column is also of type XMLTYPE still call its members fails...

    Thanks in advance for any ideas on that.

    Best regards
    Philippe

    Going on the means to go far, far back.

    2003 re: function getRootElement ORA-00904

Maybe you are looking for