Cannot create a temporary column table in HANA SP8 console

Hi All,
We upgraded the HANA to SP8 version this week, and found there are some issues when creating a temporary table.
Here is the sql:
CREATE TYPE TT_CONF AS TABLE(ID INTEGER, NAME VARCHAR(32))
CREATE LOCAL TEMPORARY COLUMN TABLE #CONF LIKE TT_CONF;
And then got the error message like below:
Could not execute 'CREATE LOCAL TEMPORARY COLUMN TABLE #CONF LIKE TT_CONF' in 220 ms 419 µs .
SAP DBTech JDBC: [598]: failed to execute the external statement: InvalidHostNameException at Communication.cpp(01174):
  message: the hostname could not be resolved
  info:    host unknown
  param:  
Is this a new constraints or just a bug? Does anybody have this issue?

Hi, queena
I also encounter the same problem in XS service. Now we import '/sap/hana/xs/libs/dbutils/procedures.xsjslib' into our project. But it will throw errors when one of the procedure's parameters is a temporary table.
Then we debug it, then we find errors come from following statement : connection.prepareStatement('CREATE LOCAL TEMPORARY COLUMN TABLE "' + localschema + '"."' + localtemp + '" LIKE "' + schema_name + '"."' + table_name + '"').execute();
So we try to delete COLUMN in the lib, then everything seems okay.

Similar Messages

  • Cannot create Global Temporary Table

    Hi,
    i'm trying to create a Global Temporary Table. However I receive a missing or invalid options specified error.
    This should be one of the most simple ways to create a Global Temporary Table right?
    DECLARE GLOBAL TEMPORARY TABLE SESSION.T_MECHANIC_ALLOCATION
    START_TIME DATE
    ,SYSUR_AUTO_KEY NUMBER
    ,EPP_AUTO_KEY NUMBER
    ,STOP_TIME DATE
    ,WOK_AUTO_KEY NUMBER
    ON COMMIT DELETE ROWS

    No, you create a Global Temporary Table in the same way as any other table: beginning with the CREATE keyword:
    CREATE GLOBAL TEMPORARY TABLE T_MECHANIC_ALLOCATION
    START_TIME DATE
    ,SYSUR_AUTO_KEY NUMBER
    ,EPP_AUTO_KEY NUMBER
    ,STOP_TIME DATE
    ,WOK_AUTO_KEY NUMBER
    ON COMMIT DELETE ROWS

  • Cannot create JVM message box in WLS 92 admin console

    Hi,
    I want to open a new windows process from weblogic admin console. I wanted to know if there is a way to launch a jvm from console.
    If I use Runtime.getRuntime().exec(cmd), cmd is a javaw command, in my console extension, I get "cannot create JVM" dialog box.
    Is this possible?
    Pl. suggest

    Hi,
    I want to open a new windows process from weblogic admin console. I wanted to know if there is a way to launch a jvm from console.
    If I use Runtime.getRuntime().exec(cmd), cmd is a javaw command, in my console extension, I get "cannot create JVM" dialog box.
    Is this possible?
    Pl. suggest

  • JSP: Create Dynamic 2 Column Table looping through iter.hasNext()

    Hi,
    I have created an ArrayList which I populate with 2 strings per element - if such a thing exists. for example my array would have
    {ccc, email}
    {bbb,ip}
    {aaa,dsl}
    {ddd,tv}
    I then sort this list using Collections.sort in which case I end up with the following:
    aaa, dsl
    bbb, ip
    ccc, email
    ddd, tv
    However, I want display the contents in 1 table with 2 columns with a check box in front of each
    i.e.
    checkbox - aaa, dsl checkbox ccc, email
    checkbox- bbb, ip checkbox ddd, tv
    I would be happy if the table was like the above, however, even if if bbb,ip printed in the right column I would be ok.
    This list example only contains 4 rows now but it could be 5 rows, 6 rows, 7 etc. It can grow/strink so that would be dynamic as well.
    I think I need to build a for loop or while loop and to somehow spit out the contents of the first element then increment and check against total lsit and do the second td statement etc. But I am not totally sure. Anyhow, I hope I haven't confused anyone who reads this. Appreciate any help or direction. Thanks

    the reason each list element contains 2 pieces of data is so that I can keep the login and type together for sorting purposes and can probably display the login -aaa along with the correct type Email etc.
    here is a snip of the code if it will help.
    List listTmp = new ArrayList();
    ArrayList allLogins = new ArrayList();
    for(int i=0;i<service_output.length;i++)
    String[] tmpStr = new String[2];
    n = service_output.indexOf('(');
    if (n > 0)
    serviceType = service_output[i].substring(0, n);
    restOfString = service_output[i].substring(n+1);
    int atsign_index = 0;
    atsign_index = restOfString.indexOf('@');
    if ((atsign_index) > 0)
    loginPrefix = restOfString.substring(0, atsign_index);
    tmpStr[0] = loginPrefix;
    tmpStr[1] = serviceType;
    LoginServType login1 = new LoginServType (tmpStr[0], tmpStr[1]);
    allLogins.add(login1);
    serviceCount++;
    else
    continue;
    else
    continue;
    roundServices= new BigDecimal(serviceCount/maxcols).setScale(2, BigDecimal.ROUND_UP);
    Collections.sort(allLogins);
    //Iterator iter = allLogins.iterator();
    for (Iterator iter = allLogins.iterator(); iter.hasNext();)
    LoginServType loginiter = (LoginServType)iter.next();
    String tempService = myformat.translateService(loginiter.getServType());
    %>
    <table summary="" class="dataDisplay borderCollapse autoLayout width100pc">
    <colgroup>
    <col class="alignLeft width30pc" />
    <col class="alignRight width30pc" />
    </colgroup>
    <thead>
    <tr>
    <th class="alignLeft sublabel_display"></th>
    </tr>
    </thead>
    <tbody>
    <tr class="">
    <input type="checkbox" name="username" value="<%=loginiter.getLogin()%>"><%=loginiter.getLogin()%> -
    <%=tempService%>
    <%iter.next(); %>
    <input type="checkbox" name="username" value="<%=loginiter.getLogin()%>"><%=loginiter.getLogin()%> -
    <%=tempService%>
    </tr>
    </tbody>
    </div>
    <%
    }//end of for loop
    %>
    </table>
    </div>
    </div>

  • Cannot create temporary table having identity column

    Hi experts,
    I saw the above error msg while running the following statement:
           create local temporary column table #tmp_table (c1 int GENERATED by default AS IDENTITY (start with 1 increment by 1), c2 int)
         Could not execute 'create local temporary column table #tmp_table(c1 int GENERATED by default AS IDENTITY (start with ...'
         SAP DBTech JDBC: [7]: feature not supported: cannot create temporary table having identity column: C1: line 1 col 48 (at pos 47)
    I understand we can support normal column table creation with identity column, but don't know why cannot support temporary column tables with identity column. Is there any configuration that can enable it for temporary column table? Or what can I do to support it indirectly, like writing a trigger to support it or something else?
    If not, then is there any future plan for this feature?
    Regards,
    Hubery

    Hi Hubery,
    I've heard this trail of arguments before...
    Customer has a solution... they want it on HANA... but they don't want to change the solution.
    Well, fair call, I'd say.
    The problem here is: there's a mix-up of solution and implementation here.
    It should be clear now, that changing DBMS systems (in any direction) will require some effort in changing the implementation. Every DBMS works a bit different than the others, given "standard" SQL or not.
    So I don't agree with the notion of "we cannot change the implementation".
    In fact, you will have to change the implementation anyhow.
    Rather than imitating the existing solution implementation on ASE, implement it on SAP HANA.
    Filling up tons of temporary tables is not a great idea in SAP HANA - you would rather try to create calculation views that present the data ad hoc in the desired way.
    That's my 2 cts on that.
    - Lars

  • Repeat to create multi-column table

    I'm trying to use a spry:repeat directive to create a
    two-column table. What I would like to have generated as a result
    of the repeat is something like the following:
    <table>
    <tr>
    <td>row[0] data</td>
    <td>row[1] data</td>
    <tr>
    <tr>
    <td>row[2] data</td>
    <td>row[3] data</td>
    <tr>
    </table>
    Using the spry:test directive it's easy to get only the even
    rows in the first TD element, but I can't figure out how to
    reference the data element for the second TD in each table row.
    Here's what my HTML looks like:
    <div id="thumbContainer" spry:region="dsPhotos">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr align="center" valign="middle" spry:repeat="dsPhotos"
    spry:test="loadThumb({ds_RowNumber}, {ds_RowCount})">
    <td width="85" height="85"><img
    src="thumbnails/{filename}" /></td>
    <td width="85" height="85"><img
    src="thumbnails/{filename}" /></td>
    </tr>
    </table>
    </div>
    The loadThumb function returns true for every other row. That
    works correctly and I see the even-numbered items in the two
    columns of each row. I've tried replacing the contents of the
    second img src attribute with every imaginable combination of
    dsPhotos.getData() and I can't find the magic combo that gets me
    the filename of the *next* row. I did try different usages of the
    ds_RowNumberPlus1 data reference but wasn't able to get that to
    work either. I verified that if I create two separate tables and
    use floating div's to get them to appear side-by-side and use
    separate spry:test functions to get the even and odd rows, I can
    iterate the data set twice and get the right contents in each
    table, but I would like to be able to solve this with a single
    table and a single iteration of the data set. Can anyone shed some
    light on how I should reference the n+1th row in my HTML table
    definition above?
    Thanks,
    Steve

    XE provides the browser-based interface for 'convenience'. You could always switch to SQLPlus or use the SQL Window and enter it manually. You could do this after the table has been created by using a documented syntax such as this sample
    ALTER TABLE sales
    ADD CONSTRAINT sales_pk PRIMARY KEY (prod_id, cust_id) DISABLE;
    found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm#i1002629
    The referenced doc also shows how to create the constraint at the same time as the table.

  • Creating Indexes in Cluster Tables

    Hi,
       I want to  enable the index for the a cluster table..how is it possible..As we see for transparent tables like MSEG ,index tab is enabled but tables like BSEG the option is disabled..Please help me find a solution..
    Regards
    Maria

    You cannot create index on cluster table in SAP.
    BSEG is a cluster table, so no index, but hopefully there are "database indexes" on BSEG, which are actual database table : BSIS, BSAS, BSID, BSAS, and so on.
    BSEG Access
    BSAD Accounting: Secondary index for customers (cleared items)
    BSAK Accounting: Secondary index for vendors (cleared items)
    BSAS Accounting: Secondary index for G/L accounts (cleared items)
    BSID Accounting: Secondary index for customers
    BSIK Accounting: Secondary index for vendors
    BSIM Secondary Index, Documents for Material
    BSIS Accounting: Secondary index for G/L accounts
    Create index on these tables.
    Look also at
    Re: Selecting data from BSEG.
    Regards

  • Cannot solve ORA-30756 "cannot create column or table of type that..."

    Hi there!
    I'm working on some excersises for the university but just can't get rid of this error.
    First, here's my SQL:
    [http://pastebin.com/f1266a668]
    And here is what I get:
    TYPE "LieferserviceTyp" Kompiliert.
    TYPE "ArtikelTyp" Kompiliert.
    TYPE "LebensmittelTyp" Kompiliert.
    TYPE "HaushaltswarenTyp" Kompiliert.
    TYPE "ArtikelInArtKombiTyp" Kompiliert.
    TYPE "ArtikelKombiTyp" Kompiliert.
    TYPE "ArtikelInKatalogTyp" Kompiliert.
    TYPE "KatalogTyp" Kompiliert.
    Fehler beim Start in Zeile 60 in Befehl:
    CREATE TABLE "Artikel" OF "ArtikelTyp" (
    PRIMARY KEY("artnr")
    Fehler bei Befehlszeile:60 Spalte:0
    Fehlerbericht:
    SQL-Fehler: ORA-30756: Spalte oder Tabelle mit einem Objekttyp, der ein Supertyp-Attribut enthält, kann nicht erstellt werden
    30756. 00000 - "cannot create column or table of type that contains a supertype attribute"
    *Cause:    The user tried to create a column or table of an object type that
    contains a supertype attribute. This is not supported because
    it leads to infinite recursion in our current storage model.
    Note that creating a column of a type implies that we
    create columns corresponding to all subtype attributes as well.
    *Action:   Change the type definition to contain a supertype REF attribute
    instead of the supertype object attribute.
    Fehler beim Start in Zeile 67 in Befehl:
    CREATE TABLE "Kataloge" OF "KatalogTyp" (
    PRIMARY KEY("katalog_id")
    Fehler bei Befehlszeile:67 Spalte:0
    Fehlerbericht:
    SQL-Fehler: ORA-30756: Spalte oder Tabelle mit einem Objekttyp, der ein Supertyp-Attribut enthält, kann nicht erstellt werden
    30756. 00000 - "cannot create column or table of type that contains a supertype attribute"
    *Cause:    The user tried to create a column or table of an object type that
    contains a supertype attribute. This is not supported because
    it leads to infinite recursion in our current storage model.
    Note that creating a column of a type implies that we
    create columns corresponding to all subtype attributes as well.
    *Action:   Change the type definition to contain a supertype REF attribute
    instead of the supertype object attribute.
    Fehler beim Start in Zeile 76 in Befehl:
    DROP TABLE "Artikel"
    Fehlerbericht:
    SQL-Fehler: ORA-00942: Tabelle oder View nicht vorhanden
    00942. 00000 - "table or view does not exist"
    *Cause:   
    *Action:
    Fehler beim Start in Zeile 77 in Befehl:
    DROP TABLE "Kataloge"
    Fehlerbericht:
    SQL-Fehler: ORA-00942: Tabelle oder View nicht vorhanden
    00942. 00000 - "table or view does not exist"
    *Cause:   
    *Action:
    DROP TYPE "KatalogTyp" erfolgreich.
    DROP TYPE "ArtikelInKatalogTyp" erfolgreich.
    DROP TYPE "ArtikelKombiTyp" erfolgreich.
    DROP TYPE "ArtikelInArtKombiTyp" erfolgreich.
    DROP TYPE "HaushaltswarenTyp" erfolgreich.
    DROP TYPE "LebensmittelTyp" erfolgreich.
    DROP TYPE "ArtikelTyp" erfolgreich.
    DROP TYPE "LieferserviceTyp" erfolgreich.
    The comments are in german but the structure should be clear I think.
    Any help appreciated!

    Unfortunately it's a bad idea to store your code samples (or screenshots or whatever) on an external site, because not everybody can get access to such sites, especially if their workplace has limitations on websites that can be visited.
    you're pastebin.com is one such site that I cannot access, so I can't see your code.
    If you want to paste code and/or data on the forums remember to put the tag: {noformat}{noformat} before _and_ after it, so that the formatting is maintained and it's easier for us to read.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ORA-00955 reports when I try to "create global temporary table" in windows

    Hi,
    When I try to run the sql in my oracle 9i server which is installed in a windows2000 machine,
    Create global temporary table test ...;
    For the first time, I can create table successfully.
    But I cannot access this table any more:
    drop table test;
    desc test;
    select * from test;
    In addition, if I try to create the table again, I got the error:
    ORA-00955: name is already used by an existing object
    While the same table can be created and dropped in another oracle9i server which is installed in Solaris 9 machine.
    So I suspect that this sould be a bug of window oracle server.
    Is there anyone who can confirm this?
    Or who can tell me how to report this bug to oracle?
    Thanks in advance.
    Please also refer the message at:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1046974576560
    If you search the text: "create global temporary table sess_event", you can see for the first time, the table is created successfully.
    But the ORA-00955 reports when the author try to create table for the second time.
    This problem is exactly the same as my problem.
    I have also made a search both in Google and in Oracle website and I cannot find any solution of it.

    Read      Metalink Note:68098.1 Subject:      Overview of Temporary Tables
    How did you difine the temporary tables? on commit delete rows are reserv rows?
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg03sch.htm#7794
    Jaffar
    Message was edited by:
    The Human Fly

  • Creating a fiscal date table that includes Day of Year and Week of Year column

    Hi,
    Our fiscal year runs between 1st October through to 30th September and I'm trying to create a date table that I can use to represent this in Powerpivot (I'm using Excel 2013). I had no probably creating columns for Fiscal month or fiscal year, however I am
    having issue breaking it down more than that, specifically I cannot work out how to calculate:
    - day of the year
    - week of the year (with week one starting on the first day of the year rather than the first Monday)
    I worked out how to do the day of the year until I had to try and account for leap years which broke the formula I had! Can anyone please recommend solutions, I cannot see anything online about this. Obviously I know that it is simple to do this for a normal
    calendar year but this approach doesn't work with a custom fiscal year.
    Whilst it is useful for several reasons, my main reason for wanting week is so that I can plot my Pivotcharts more smoothly (although I may have missed an easier way to do that).
    Thanks,
    James

    For my example I started with 1 column in Power Pivot called [Date]
    I created the following Columns
    [DayofMonth] =Day([Date])
    [MonthNumber] =Month([Date])
    [Fiscal Year] =IF([MonthNumber]< 10, Year([Date]), (Year([Date])+1))
    [Fiscal Day] =[Date] - DATE(([Fiscal Year] -1), 10,1) +1
    [Fiscal Week] =RoundUp([Fiscal Day] / 7, 0)
    Change [Date] to whatever your date column is and those DAX formulas will get you what you need

  • Not able to create rows in a table with dependent columns in an OAF page.

    We have a table in an OAF page which has the property "Records Displayed" set as "10". Hence pagination kicks in for more than 10 rows in the table. "Add rows" is enabled in this table. The table also has 'detail' component.
    In this table, we have created 2 new columns (dropdowns) using personalization. Dropdown 2 is dependent on the value selected in Dropdown1. Both are required fields.
    We are able to add new rows to the table. All the columns render properly. Dropdown 2 also renders properly depending on the values selected in Dropdown1. There is no issue until we add the 10th row (remember the number of displayed records in the tabble is 10). When we add the 10th row, the fields appear properly. Dropdown1 values are displayed as expected. But when we select a value in Dropdown1, Dropdown2 does not refresh and get populated with the expected values (depending on Dropdown1 values). Dropdown2 remains blank. But this happens only when the 10th row is added. Since Dropdown2 is a required field and since Dropdown2 is not refreshed with values depending on Dropdown1, the records cannot be saved.
    There seems to be a problem with refresh when the nth row is added to the table where 'n' is the Records displayed in the table (pagination).
    If we change the Records Displayed to say 15 then we have the above problem when adding the 15th row. 14 rows can added to the table without an issue.
    Can a workaround (other than increasing the number of displayed records) be provided for this issue?

    Hi,
    I suspect you have written a method having String return type but the method does not have return statement.
    Go to the Catalogue component->BPM Object->Right click on the BPM object and select New Method->Give the method name. Now the method window will be opened. Go to the propertied tab of the right most panel. Set the return type as string. In the method window editor write your business logic. The below mentioned code is for sample one.
    String msg = "Hello World";
    return msg;
    Bibhu

  • ORA-02348: cannot create VARRAY column with embedded LOB

    Hi
    This error message I get when I try to create a table from my schema file which has a (sub-) element of type CLOB.
    In my XML document I have an element which needs to become declared a CLOB (because it's > 4000 bytes), in my Schema I define it's element node like:
    <xs:element name="MocovuState" xdb:SQLType="CLOB">
    I can register this Schema file but when I create the table, I get the error:
    ORA-02348: cannot create VARRAY column with embedded LOB
    Does anybody know how to handle this ?
    Marcel

    You need to use the xdb:storeVarrayAsTable="true" schema annotation so that unbounded elements are created at schema registration time as nested tables. Varrays can not contain CLOBs/BLOBS. Use the schema annotation xdb:SQLType="CLOB" to tell Oracle XMLDB to use CLOB storage for the element. See your schema below:
    P.S. XMLSPY is invaluable as it supports Oracle XML Schema annotations.
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="http://www.yourregisteredschemanamespace.com" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="nRootNode">
              <xs:complexType>
                   <xs:all>
                        <xs:element name="nID" type="xs:long"/>
                        <xs:element name="nStringGroup" type="nStringGroup" minOccurs="0"/>
                   </xs:all>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="nStringGroup">
              <xs:sequence>
                   <xs:element name="nString" type="nString" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="nString" xdb:SQLType="CLOB">
              <xs:sequence>
                   <xs:element name="nValue" type="nValue" minOccurs="0" xdb:SQLType="CLOB"/>
              </xs:sequence>
              <xs:attribute name="id" type="xs:long" use="required"/>
         </xs:complexType>
         <xs:simpleType name="nValue">
              <xs:restriction base="xs:string">
                   <xs:minLength value="1"/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

  • What is the syntax for creating global temporary table using a select query

    hii
    I'm creating a global temporary table using a select query ..how to mention 'on commit preserve rows' that?
    create global temporary table t1 as select * from trn_ordbase on commit preserve rows;
    but this is invalid syntax,so how to mention on commit preserve rows in this???if i dont mention it ,by default its considering as on commit delete rows.
    Please help me out of this problem.

    create global temporary table t1 as select * from trn_ordbase on commit preserve rows;You CANNOT use this syntax.
    http://download-east.oracle.com/docs/cd/B19188_01/doc/B15917/sqcmd.htm
    http://download-east.oracle.com/docs/cd/B19188_01/doc/B15917/glob_tab.gif
    http://download-east.oracle.com/docs/cd/B19188_01/doc/B15917/cre_tabl.gif

  • Can create view, but cannot create table / materialized view: Xpath is null

    Hi all,
    We recently moved some XML documents into the database in an XMLType column and want to query the data. I've been writing some queries and turning them into materialized views. I got to one query, and something really strange is happening. My query returns the expected results, but I am getting an error when I try to create a materialized view out of it. Even stranger, I can create a view out of it, and I can manually insert its data into an existing table, but I cannot create a materialized view out of it and I cannot create a table out of it. Here is a brief summary, please let me know if anyone has suggestions.
    Issuing the following commands fails in SQLDeveloper
    -- Creating a materialized view out of the query fails:
    create materialized view element REFRESH COMPLETE ON DEMAND as [query];
    Error at Command Line:1 Column:1 SQL Error: ORA-31063: XPath compilation failed: Xpath is null.
    -- Creating a table out of the query with the following shortcut fails:
    create table element as [query];
    Error at Command Line:1 Column:1 SQL Error: ORA-31063: XPath compilation failed: Xpath is null.
    Issuing the following commands in SQLDeveloper works fine:
    -- Creating a view out of the query works:
    create or replace view element as [query];
    -- Creating a blank table from the query and then inserting data works:
    create table element as select * from [query] where 1 = 2;
    insert into element select * from [query];
    Here is a simplified version of the query...
    I have changed the names around, and cut the query down so maybe it will be a little easier to understand. I did confirm that this query is also having the same symptoms described above. Since I changed the names, executing the query returns no results. However creating a materialized view out of the query still fails with the 'Xpath is null' error.
    create materialized view element REFRESH COMPLETE ON DEMAND as
    select
    m.resource_id,
    xml.*
    from metadata_sources m,
    xmltable(
    'for $i in /metadata/app//*[(self::elem1 or self::elem2) and (parent::form or parent::subform)]
    let $formName := if($i/parent::subform) then $i/../../@name else $i/../@name
    let $subformName := if($i/parent::subform) then $i/../@name else ""
    return <data
    appId="{$i/ancestor::app[1]/idField}"
    formName="{$formName}"
    subformName="{$subformName}"
    elemName="{$i/@name}"></data>' passing m.xml_content
    columns
    app_id NUMBER path '@appId',
    form_name VARCHAR2(50 char) path '@formName',
    subform_name VARCHAR2(50 char) path '@subformName',
    elem_name VARCHAR2(50 char) path '@elemName'
    ) xml;
    Edited by: user11949534 on Feb 22, 2013 1:55 PM

    As far as creating a structured index, I was under the impression that I would need to then register an XSD. No, you can use it without an XML schema.
    How about a regular relational view, with an underlying xml index?
    That way you also eliminate the need for an explicit refresh step as you would then be querying real-time data, as if it were relational data.
    For example :
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    SQL> create table tmp_xml of xmltype ;
    Table created.
    SQL> insert into tmp_xml values (
      2    xmlparse(document '<root><item id="1">ABC</item><item id="2">DEF</item></root>')
      3  ) ;
    1 row created.
    SQL> insert into tmp_xml values (
      2    xmlparse(document '<root><item id="3">GHI</item><item id="4">JKL</item></root>')
      3  ) ;
    1 row created.
    SQL> create or replace view tmp_xml_v as
      2  select x.item_id, x.item_val
      3  from tmp_xml
      4     , xmltable(
      5         '/root/item' passing object_value
      6         columns item_id  number      path '@id'
      7               , item_val varchar2(3) path '.'
      8       ) x
      9  ;
    View created.
    SQL> create index tmp_xml_sxi on tmp_xml (object_value)
      2  indextype is xdb.xmlindex
      3  parameters (q'#
      4  XMLTABLE tmp_xml_xtb '/root/item'
      5  COLUMNS item_id  number      path '@id'
      6        , item_val varchar2(3) path '.' #'
      7  ) ;
    Index created.
    SQL> exec dbms_stats.gather_table_stats(user, 'TMP_XML');
    PL/SQL procedure successfully completed.
    SQL> set autotrace on explain
    SQL> set lines 200
    SQL> select * from tmp_xml_v ;
       ITEM_ID ITE
             3 GHI
             4 JKL
             1 ABC
             2 DEF
    Execution Plan
    Plan hash value: 4168126828
    | Id  | Operation                    | Name                   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                        |     4 |   164 |     3   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS                |                        |       |       |            |          |
    |   2 |   NESTED LOOPS               |                        |     4 |   164 |     3   (0)| 00:00:01 |
    |   3 |    INDEX FULL SCAN           | SYS_C009273            |     2 |    34 |     1   (0)| 00:00:01 |
    |*  4 |    INDEX RANGE SCAN          | SYS30366_30367_OID_IDX |     2 |       |     0   (0)| 00:00:01 |
    |   5 |   TABLE ACCESS BY INDEX ROWID| TMP_XML_XTB            |     2 |    48 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - access("TMP_XML"."SYS_NC_OID$"="SYS_SXI_0"."OID")

  • Can not create table with the CLOB type VARRAY, ORA-02348: cannot create VA

    CREATE OR REPLACE TYPE Project AS OBJECT (
    project_no NUMBER(2),
    title VARCHAR2(35),
    cost CLOB );
    CREATE OR REPLACE TYPE ProjectList AS VARRAY(50) OF Project;
    CREATE TABLE department (
    dept_id NUMBER(2),
    name VARCHAR2(15),
    budget NUMBER(11,2),
    projects ProjectList );
    The table creatation always with the error :
    ORA-02348: cannot create VARRAY column with embedded LOB
    Can anybody help ???

    Hi Peng,
    It seems you have hit a limitation of the Oracle version, which you don't post.
    Limitations are sometimes also called a 'feature'.
    You would need to find out whether this restriction has been lifted in a subsequent release or redesign your application.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • HELP!!! x60s Few Issues (Audio etc.) after Clean Installation of XP SP3 (10/3/2011)

    Hope some expert give me some enlightenment on my issues below; I have X60s (1702) that I used for many years without much problem (except I was never able to work with my Bluetooth). Out of frustration of so called Blue Screen, I completely re-insta

  • Could not process file 'Input 110110b.txt': com.sap.aii.adapter.file.

    I have a FILE Adapter using FTP as a transport that is generating a very odd error. The FTP sender channel is giving the following error is set up to retreive all files (*) from a specific directory.  If you look at the error, it indicates an error p

  • Slow, older Macbook

    5 yr old macbook 4.1 is verrrrry slow. how can I speed it up?

  • "user license"  management

    Hi Jim, is it possible to manage a specific user issued-license from the API ? for example, if i would like to change the time limit on a specific book for a specific user after he has downloaded and opened it ? im trying to find the best method to m

  • IPhone case question

    A friend of mine has a different company's phone which tilts up on it's base (landscape mode) so that he can watch Slingbox while the phone sits on a table. I enjoy taking my iPhone on airplanes with movies on it to watch. Holding it in a position to