Uniting object tables

Hi.
Could you please help me solve a problem with the following query:
SELECT
CAST
(MULTISET
(SELECT SPATIAL_TYPE (PLACE, BOUNDINGBOX)
FROM
(SELECT
GEMETTYPE(TH_THES_NO, TH_LANG_NO, TH_DESC_NO) PLACE,
BOUNDINGBOX_TYPE(NULL, NULL, NULL, NULL) BOUNDINGBOX
FROM
DATTHESREL
WHERE
DATTHESREL.DAT_ID = DATACORE.DAT_ID
UNION
SELECT
GEMETTYPE(NULL, NULL, NULL) PLACE,
BOUNDINGBOX_TYPE(WEST, EAST, NORTH, SOUTH) BOUNDINGBOX
FROM
BOUNDINGBOX
WHERE
BOUNDINGBOX.DAT_ID = DATACORE.DAT_ID)) AS SPATIAL_LIST)
FROM
DATACORE;
This query resoults an error message
DATTHESREL.DAT_ID = DATACORE.DAT_ID
ERROR at line 12:
ORA-00904: invalid column name
How could I pass DAT_ID of current DATACORE record into inner unioned subqueries?
I need to unite two object tabes one with SPATIAL_TYPE(GEMET, NULL) the other with SPATIAL_TYPE(NULL, BOUNDINGBOX). UNION of two collections doesnt work (ora-03001).
There is a way to do this using joins but it is a bad approach.
Any ideas?
Yeah, everything whithin a view definition.

Hi.
Could you please help me solve a problem with the following query:
SELECT
CAST
(MULTISET
(SELECT SPATIAL_TYPE (PLACE, BOUNDINGBOX)
FROM
(SELECT
GEMETTYPE(TH_THES_NO, TH_LANG_NO, TH_DESC_NO) PLACE,
BOUNDINGBOX_TYPE(NULL, NULL, NULL, NULL) BOUNDINGBOX
FROM
DATTHESREL
WHERE
DATTHESREL.DAT_ID = DATACORE.DAT_ID
UNION
SELECT
GEMETTYPE(NULL, NULL, NULL) PLACE,
BOUNDINGBOX_TYPE(WEST, EAST, NORTH, SOUTH) BOUNDINGBOX
FROM
BOUNDINGBOX
WHERE
BOUNDINGBOX.DAT_ID = DATACORE.DAT_ID)) AS SPATIAL_LIST)
FROM
DATACORE;
This query resoults an error message
DATTHESREL.DAT_ID = DATACORE.DAT_ID
ERROR at line 12:
ORA-00904: invalid column name
How could I pass DAT_ID of current DATACORE record into inner unioned subqueries?
I need to unite two object tabes one with SPATIAL_TYPE(GEMET, NULL) the other with SPATIAL_TYPE(NULL, BOUNDINGBOX). UNION of two collections doesnt work (ora-03001).
There is a way to do this using joins but it is a bad approach.
Any ideas?
Yeah, everything whithin a view definition.

Similar Messages

  • How to verify whether the persistence unit objects are persistent or not?

    How to verify whether the persistence unit objects are persistent or not?
    I have successfully configure and deploy the Employees object as a persistence unit in Oracle Coherence according to the guide of Chapter 6 of Tutorial for Oracle Coherence 3.5.
    Using the RunEmployeeExample script, I have got the right results. I can see that after the cache object is updated, the database table (Employees) is also updated accordingly. The following is the output:
    2009-11-05 11:09:55.043/53.467 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2009-11-05 11:09:54.867, Add
    ress=192.168.8.80:8089, MachineId=24656, Location=process:1684, Role=OracleRunEmployeeExample) joined Cluster with senior member 1
    2009-11-05 11:09:55.604/54.028 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service Management with senior memb
    er 1
    2009-11-05 11:09:56.885/55.309 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to member 2 using TcpSocket{Sta
    te=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=8089,localport=4084]}
    2009-11-05 11:09:57.847/56.281 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service JpaDistributedCache with se
    nior member 1
    2009-11-05 11:09:57.917/56.341 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): Service JpaDistributed
    Cache: sending ServiceConfigSync containing 258 entries to Member 2
    2009-11-05 11:10:04.086/62.510 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): Deferring the distribu
    tion due to 1 pending configuration updates
    [EL Info]: 2009-11-05 11:10:14.36--ServerSession(2883071)--EclipseLink, version: Eclipse Persistence Services - 1.1.1.v20090430-r4097
    [EL Info]: 2009-11-05 11:10:22.312--ServerSession(2883071)--file:/C:/JDeveloper/mywork/AppJPA/JPA/classes/-JPA login successful
    2009-11-05 11:10:24.305/82.729 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): 3> Transferring 128 ou
    t of 257 primary partitions to member 2 requesting 128
    2009-11-05 11:10:25.697/84.121 Oracle Coherence GE 3.5.2/463 <D4> (thread=DistributedCache:JpaDistributedCache, member=1): 1> Transferring 129 ou
    t of 129 partitions to a node-safe backup 1 at member 2 (under 129)
    2009-11-05 11:10:25.857/84.281 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): Transferring 0KB of ba
    ckup[1] for PartitionSet{128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
    152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
    181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
    210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
    239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256} to member 2
    2009-11-05 11:10:40.678/99.102 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: disconnected from member 2 due to a kill r
    equest
    2009-11-05 11:10:40.678/99.102 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 left service Management with senior member
    1
    2009-11-05 11:10:40.678/99.102 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 left service JpaDistributedCache with seni
    or member 1
    2009-11-05 11:10:40.708/99.132 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2009-11-05 11:10:40.708, Add
    ress=192.168.8.80:8089, MachineId=24656, Location=process:1684, Role=OracleRunEmployeeExample) left Cluster with senior member 1
    2009-11-05 11:10:40.879/99.303 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:JpaDistributedCache, member=1): Restored from backup
    128 partitions
    2009-11-05 11:10:40.879/99.303 Oracle Coherence GE 3.5.2/463 <D4> (thread=DistributedCache:JpaDistributedCache, member=1): 0, 1, 2, 3, 4, 5, 6, 7
    , 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 4
    4, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
    , 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 11
    3, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
    2009-11-05 11:28:39.800/1178.224 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2009-11-05 11:28:39.635, A
    ddress=192.168.8.80:8089, MachineId=24656, Location=site:metsys.metex.com,machine:mw12,process:1752, Role=CoherenceConsole) joined Cluster with s
    enior member 1
    2009-11-05 11:28:40.231/1178.655 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service Management with senior me
    mber 1
    2009-11-05 11:28:41.633/1180.057 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to member 2 using TcpSocket{S
    tate=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=8089,localport=4143]}
    2009-11-05 11:30:01.658/1260.082 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCache with sen
    ior member 2But I cannot verify if the persistence unit is still persistent.
    Edited by: jetq on Nov 5, 2009 11:49 AM

    I start a Coherence Console in another Windows Command Prompt as the following:
    D:\coherence\bin>  coherence.cmd
    ** Starting storage disabled console **
    java version "1.6.0_11"
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2009-11-05 11:57:22.167/9.734 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Service Cluster joined th
    e cluster with senior service member n/a
    2009-11-05 11:57:22.197/9.764 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Failed to satisfy the v
    ariance: allowed=16, actual=20
    2009-11-05 11:57:22.197/9.764 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Increasing allowable va
    riance to 17
    2009-11-05 11:57:22.677/10.244 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): This Member(Id=3, Time
    stamp=2009-11-05 11:57:22.392, Address=192.168.8.80:8089, MachineId=24656, Location=process:460, Role=CoherenceConsole,
    Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) joined cluster "cluster:0xD3FB" with senior Member(Id
    =1, Timestamp=2009-11-05 11:09:09.738, Address=192.168.8.80:8088, MachineId=24656, Location=process:1816, Role=Coherence
    Server, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1)
    2009-11-05 11:57:22.737/10.304 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Member 1 joined Service
    Management with senior member 1
    2009-11-05 11:57:22.737/10.304 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Member 1 joined Service
    JpaDistributedCache with senior member 1
    2009-11-05 11:57:23.108/10.675 Oracle Coherence GE 3.5.2/463 <D5> (thread=Invocation:Management, member=3): Service Mana
    gement joined the cluster with senior service member 1
    2009-11-05 11:57:23.759/11.326 Oracle Coherence GE 3.5.2/463 <D5> (thread=TcpRingListener, member=3): TcpRing: connectin
    g to member 1 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=4168,localport=8089]}
    SafeCluster: Name=cluster:0xD3FB
    Group{Address=224.3.5.2, Port=35463, TTL=4}The previous output shows that this Coherence console (the client side) has already joined the JPA server.
    But the following output shows us that this console cannot access the Employees cache and cannot get the object entry. Why?
    Map (?): cache Employees
    2009-11-05 12:11:41.653/869.220 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=3): Loaded cache configuration
    from "jar:file:/D:/coherence/lib/coherence.jar!/coherence-cache-config.xml"
    2009-11-05 12:11:43.055/870.622 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache, member=3): Service Distribu
    tedCache joined the cluster with senior service member 3
    <distributed-scheme>
      <!--
      To use POF serialization for this partitioned service,
      uncomment the following section
      <serializer>
      <class-
      name>com.tangosol.io.pof.ConfigurablePofContext</class-
      name>
      </serializer>
      -->
      <scheme-name>example-distributed</scheme-name>
      <service-name>DistributedCache</service-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>example-binary-backing-map</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <autostart>true</autostart>
    </distributed-scheme>
    Map (Employees): list
    2009-11-05 12:11:48.402/875.969 Oracle Coherence GE 3.5.2/463 <Error> (thread=main, member=3):
    java.lang.RuntimeException: Storage is not configured
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissing
    Storage(DistributedCache.CDB:9)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureReq
    uestTarget(DistributedCache.CDB:33)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendParti
    tionedRequest(DistributedCache.CDB:31)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(Dist
    ributedCache.CDB:13)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap$EntrySet.
    size(DistributedCache.CDB:1)
            at com.tangosol.util.ConverterCollections$ConverterEntrySet.size(ConverterCollections.java:2720)
            at com.tangosol.coherence.component.application.console.Coherence.doList(Coherence.CDB:74)
            at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:442)
            at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
            at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.tangosol.net.CacheFactory.main(CacheFactory.java:1400)Edited by: jetq on Nov 5, 2009 12:18 PM

  • Using REF with object table in SQL Developer

    When i create object tables and fill them with data, then in SQL Developer de REF value isn't displayed.
    I did the following:
    CREATE TYPE adres_type AS OBJECT
    (straat VARCHAR2(20)
    ,nummer VARCHAR2(10)
    ,postcode VARCHAR2(6)
    ,plaats VARCHAR2(50));
    CREATE TABLE adressen of adres_type;
    CREATE TYPE locatie_type AS OBJECT
    (nr NUMBER
    ,naam VARCHAR2(20)
    ,adres REF adres_type);
    CREATE TABLE locaties OF locatie_type;
    CREATE TABLE locaties OF locatie_type
    (SCOPE FOR (adres) IS adressen);
    insert into adressen values (adres_type('Arnhemsestraatweg', '33','6881ND','Velp'));
    insert into locaties values (1,'Directie', (select ref (a) from adressen a where a.plaats = 'Velp'))
    Then in SQL Developer de REF(A) column is empty, while in SQL*Plus it displays the REF value:
    In SQL Developer: SELECT a.*, REF(a) FROM adressen a;
    STRAAT NUMMER POSTCODE PLAATS REF(A)
    Arnhemsestraatweg 33 6881ND Velp
    In SQLPLUS: SELECT a.*, REF(a) FROM adressen a;
    STRAAT NUMMER POSTCODE PLAATS REF(A)
    Arnhemsestraatweg 33 6881ND Velp 0000280209C70341FBB96B4F77813B27B50E53BB4332382E22ADD64AD9B755F651D416B6DA010134
    Is this a bug or is there another reason why the ID doesnt display in SQL Developer.
    (this didnt work in all the previous SQL Developer releases and still not in de 2.1 E.A. version)

    Hi <not sure of your first name>,
    I have replicated the issues and logged a bug against this
    Bug 9102579 - FORUM: REF FUNCTION NOT RETURNING CORRECT RESULT
    Regards,
    Dermot O'Neill
    SQL Developer Team

  • IN_WRONG_TABLESPACE, object: table/index

    Hi all,
    Apologies for the repost of this topic. I have seen it a few times but without resolutions. My problem is as follows.
    BR0970W Database administration alert - level: WARNING, type: IN_WRONG_TABLESPACE, object: (index) SAPSR3.D010INC~1, value: PSAPSR346C       
    BR0970W Database administration alert - level: WARNING, type: IN_WRONG_TABLESPACE, object: (table) SAPSR3.D010L, value: PSAPSR346C
    This is IAORA.
    TABART
    TABSPACE
    PCTINC
    OFREELIST
    OPCTFREE
    APPL0
    PSAPSR3
    0000
    1
    10
    APPL1
    PSAPSR3
    0000
    1
    10
    APPL2
    PSAPSR3
    0000
    1
    10
    CLUST
    PSAPSR3
    0000
    1
    10
    POOL
    PSAPSR3
    0000
    1
    10
    SDIC
    PSAPSR3
    0
    1
    10
    SDOCU
    PSAPSR3
    0000
    1
    10
    SLDEF
    PSAPSR346D
    0000
    1
    10
    SLEXC
    PSAPSR346D
    0000
    1
    10
    SLOAD
    PSAPSR3
    0000
    1
    10
    SPROT
    PSAPSR3
    0000
    1
    10
    SSDEF
    PSAPSR346D
    0000
    1
    10
    SSEXC
    PSAPSR346D
    0000
    1
    10
    SSRC
    PSAPSR3
    0000
    1
    10
    TEMP
    PSAPSR3
    0000
    1
    10
    USER
    PSAPSR3USR
    0000
    1
    10
    USER1
    PSAPSR3USR
    0000
    1
    10
    This is TAORA.
    TABART
    TABSPACE
    PCTINC
    OFREELIST
    OFREEGROUP
    OPCTFREE
    OPCTUSED
    APPL0
    PSAPSR3
    0000
    001
    01
    10
    40
    APPL1
    PSAPSR3
    0000
    1
    1
    10
    40
    APPL2
    PSAPSR3
    0000
    1
    1
    10
    40
    CLUST
    PSAPSR3
    0000
    1
    1
    10
    40
    POOL
    PSAPSR3
    0000
    1
    1
    10
    40
    SDIC
    PSAPSR3
    0
    1
    1
    10
    40
    SDOCU
    PSAPSR3
    0000
    1
    1
    10
    40
    SLDEF
    PSAPSR346D
    0000
    1
    1
    10
    40
    SLEXC
    PSAPSR346D
    0000
    1
    1
    10
    40
    SLOAD
    PSAPSR3
    0000
    1
    1
    10
    40
    SPROT
    PSAPSR3
    0000
    1
    1
    10
    40
    SSDEF
    PSAPSR346D
    0000
    1
    1
    10
    40
    SSEXC
    PSAPSR346D
    0000
    1
    1
    10
    40
    SSRC
    PSAPSR3
    0000
    1
    1
    10
    40
    TEMP
    PSAPSR3
    0000
    1
    1
    10
    40
    USER
    PSAPSR3USR
    0000
    1
    1
    10
    40
    USER1
    PSAPSR3USR
    0000
    1
    1
    10
    40
    select tablespace_name from dba_tablespaces;
    SYSTEM,PSAPUNDO,SYSAUX,PSAPTEMP,PSAPSR3,PSAPSR346C,PSAPSR3USR
    Tablespace does exist as you can see above now to determine type of tablespace, and as per below query you can see it contains
    both data and indexes.
    select distinct(segment_type), tablespace_name from dba_segments order by tablespace_name;
    SEGMENT_TYPE       TABLESPACE_NAME
    INDEX              PSAPSR3
    TABLE              PSAPSR3
    INDEX              PSAPSR346C
    TABLE              PSAPSR346C
    TABLE              PSAPSR3USR
    TYPE2 UNDO         PSAPUNDO
    INDEX              SYSAUX
    INDEX PARTITION    SYSAUX
    LOB PARTITION      SYSAUX
    LOBINDEX           SYSAUX
    LOBSEGMENT         SYSAUX
    As per note 655162 option 1 and 2 are applicable to me. But as this tablespace seems to be both a data and index tablespace I am thinking I need to create the tablespace entry in IAORA and TAORA.
    How would I correctly edit these table entries and which of the following tables might also have to be edited?
    DDART and DARTT are used to maintain the classes ( tabarts)
    DD09L maps the tables to each class ( tabart)
    TAORA/IAORA maps the classes to the tablespaces
    TSORA lists the tablespaces.
    As a non dba I find the sap note a bit confusing please advise.
    Kind Regards,
    Johan

    Hi guys,
    For clarification:
    disp+work information
    kernel release                46D
    kernel make variant           46D_EXT
    DBMS client library           OCI_920__OCI_7_API
    DBSL shared library version   46D.00
    compiled on                   Linux 2.6.5-7.202.5-smp #1_SMP_Thu_Aug_25_06:20:45_UTC_2005 x86_64
    compiled for                  64 BIT
    compile time                  Aug 10 2008 21:39:12
    update level                  0
    patch number                  2415
    source id                     0.2415
    supported environment
    database (SAP, table SVERS)   46A
                                  46B
                                  46C
                                  46D
    DBMS server                   ORACLE 8.0.5..
                                  ORACLE 8.0.6..
                                  ORACLE 8.1.6..
                                  ORACLE 8.1.7..
                                  ORACLE 9.2.0..
                                  ORACLE 10.2.0..
    operating system              Linux 2.6
                                  System build information:
                                  LCHN  :
    System components:
    ST-PI     2008_1_46C
    ST-A/PI     01J_R3_46C
    SAP_NOTES     46C
    SAP_HR     46C
    SAP_BASIS     46C
    SAP_APPL     46C
    SAP_ABA     46C
    Regards,
    J

  • How to get the List of Database Objects (Table/View) for a given APEX Page.

    Hi,
    I have an application and that consist of pages like page1,2,3,.....
    *1.* I want a report which can give me the list of all the Pages1,2,3,....
    I am using the following query to acheive this.... THIS IS FINE..
    select a.workspace, a.owner, a.application_name, b.page_id, b.page_name
      from apex_applications a,
           apex_application_pages b
    where a.workspace = b.workspace
       and a.application_id = b.application_id*2. Now, I want for each individual page*, the list all the database objects (tables/views), which that page is using.
    I am using ALL_DEPENDENCIES , but I am not getting the result.
    So, want to know if there any view/table, where I can get the Application Pages & there database object list...
    Thanks,
    Deepak

    Hari,
    Thanks for the response.
    The view APEX_APPLICATION_PAGE_DB_ITEMS will only give me the table name related to any Page Items defined to that page..It will not give me all the database objects..
    suppose we have a Page, having a report based on multiple tables and there is no Page items defined on that page, we will not have any value in this ....DB_ITEMS table. same thing if we have define some PL|SQL(using some table/view) in a Process, that will not be populated in .....DB_ITEMS table. I want some thing like all the database objects (table/views/function/procedure/.....) for a particular Page ID.
    Thanks,
    Deepak

  • How to insert subtype data from another table in  a object table ?

    Hi all
    I have been looking at the differences answers there are about insert data form a subtype in a object table of a supertype ,but have not found a solution yet.
    I hope you can help me.
    I my code Action_Logs is the object table and CloseStore_Logs_t is a subtype of Action_Logs_t
    My code is
    insert into Action_Logs(CloseStore_Logs_t (action_logs_id , physicalstores.physicalstores_id , brandedstores.BRANDEDSTORES_ID ,physicalstores.COMPANIES_ID ,brandedstores.CREATED_BY ,
    brandedstores.CREATED_DATE , brandedstores.DELETED ,brandedstores.CLOSED_DATE as brandedstore_closedate,
    physicalstores.CLOSED_DATE as physicalstore_closedate)
    select CloseStore_Logs_t((null as action_logs_id , physicalstores.physicalstores_id , brandedstores.BRANDEDSTORES_ID ,physicalstores.COMPANIES_ID ,brandedstores.CREATED_BY ,
    brandedstores.CREATED_DATE , brandedstores.DELETED ,brandedstores.CLOSED_DATE as brandedstore_closedate,
    physicalstores.CLOSED_DATE as physicalstore_closedate)
    from physicalstores , brandedstores ,companies
    where physicalstores.physicalstores_id = brandedStores.PHYSICALSTORES_ID and
    physicalstores.COMPANIES_ID = companies.COMPANIES_ID and
    brandedstores.closed_date is not null
    oracle gives a ora _917 fault about a missing comma , but I can not se what is wrong.
    I will be glad, if you can give me an example with a right syntax where a subtype is selected from other/s tables an inserted in table of its supertype.
    kinds regards
    steen ostersen

    Hi
    I see two problems with your statement:
    1) The utilization of the values clause is not permitted along with a subquery.
    2) The AS are not allowed.
    So, something like that should work:
    insert into Action_Logs
    select CloseStore_Logs_t(null,
    physicalstores.physicalstores_id,
    brandedstores.BRANDEDSTORES_ID,
    physicalstores.COMPANIES_ID,
    brandedstores.CREATED_BY,
    brandedstores.CREATED_DATE,
    brandedstores.DELETED,
    brandedstores.CLOSED_DATE,
    physicalstores.CLOSED_DATE)
    from physicalstores , brandedstores ,companies
    where physicalstores.physicalstores_id = brandedStores.PHYSICALSTORES_ID and
    physicalstores.COMPANIES_ID = companies.COMPANIES_ID and
    brandedstores.closed_date is not null
    HTH
    Chris

  • How do I reference the instance in a constraint on an object table?

    I want to create a unique constraint that involves the result of a deterministic member function.
    I can do it just fine if I create table with a column of the object type:
    drop table test_table1;
    drop table test_table2;
    drop type test_type;
    create type test_type as object (
         alpha varchar2(30),
         member function get_beta return varchar2 deterministic
    show errors;
    create type body test_type as
         member function get_beta return varchar2 deterministic is
         begin
              return 'Beta';
         end;
    end;
    show errors;
    create table test_table1 (
         test_instance mattk.test_type,
         beta varchar2(4000) as (test_type.get_beta(test_instance)),
         constraint test_table1_pk primary key (beta)
    insert into test_table1 (test_instance) values (test_type('Alpha'));
    commit;
    insert into test_table1 (test_instance) values (test_type('Gamma'));
    commit;As I said, this works just fine, and the second insert statement produces the following error:
    insert into test_table1 (test_instance) values (test_type('Gamma'))
    ORA-00001: unique constraint (MATTK.TEST_TABLE1_PK) violatedHowever, I'd really like my table to be an object table.
    If I do that:
    create table test_table2 of test_type;How do I then reference the object instance that the row represents?

    I've got it all worked out now. Thanks everyone for the helpful advice.
    I changed the type definition slightly. I added an Attribute for Beta, in addition to keeping the deterministic member function.
    drop table test_table2;
    drop type test_type;
    create type test_type as object (
         alpha varchar2(30),
         beta varchar2(30),
         member function get_beta return varchar2 deterministic
    show errors;
    create type body test_type as
         member function get_beta return varchar2 deterministic is
         begin
              if (self.beta <> 'Beta') then
                   raise_application_error(-20000, 'Beta is not properly set.');
              end if;
              return 'Beta';
         end;
    end;
    show errors;
    create table test_table2 of test_type;
    alter table test_table2 add (
         constraint test_table2_pk primary key (alpha, beta)
    create unique index test_table2_idx1 on test_table2(test_type.get_beta(object_value));
    insert into test_table2 values (test_type('Alpha', 'Beta'));
    commit;
    insert into test_table2 values (test_type('Gamma', 'Beta'));
    update test_table2 t set t.beta = 'BETA';
    insert into test_table2 values (test_type('Delta', 'Delta'));Correctly produces the following errors:
    insert into test_table2 values (test_type('Gamma', 'Beta'))
    ORA-00001: unique constraint (MATTK.TEST_TABLE2_IDX1) violated
    update test_table2 t set t.beta = 'BETA'
    ORA-20000: Beta is not properly set.
    ORA-06512: at "MATTK.TEST_TYPE", line 5
    insert into test_table2 values (test_type('Delta', 'Delta'))
    ORA-20000: Beta is not properly set.
    ORA-06512: at "MATTK.TEST_TYPE", line 5The presence of the unique index over the deterministic member function guarantees that function will be called on any insert or update, which gives it the opportunity to error out if the attribute is not properly set.
    The reason I was interested in doing this is because Oracle does not support constant attribute values.
    Again, thanks everyone for the helpful replies.

  • How do you "un-unite" objects

    In Pages 5.+, you can "unite" objects. This is Apple's pathetic attempt at allowing linked text boxes, among other things. However, there is no way to "un-unite" text boxes. At least, I can't find one--aside from using the undo feature to undo everything back to the point where I united the text boxes in the first place. Anyone help?

    Nope that's it.
    Why do you persist with Pages 5.5 if that is important to you?
    Peter

  • Update statement for object table.

    Hi,
    I have created one type as
    Create type test as object(
    ins_by varchar2(30),
    ins_on date,
    upd_by varchar2( 30),
    upd_on date);
    and then created an object table as
    create table imst(
    i_code number(5),
    i_desc varchar2(35),
    i_op test);
    now i am able to insert record in this table as
    insert into imst values(1,'Hawkins cooker',test(user,sysdate,'',''));
    Above works fine.
    But I would also like to update the record with i_op.upd_by,i_op.upd_on with some other values.
    Can any body help me specifying how to write a plain update statement for the same.
    Regards.
    Soumen

    Check it out:
    SQL> Create type myTest as object(
      2  ins_by varchar2(30),
      3  ins_on date,
      4  upd_by varchar2( 30),
      5  upd_on date);
      6  /
    Type created.
    SQL> create table imst(
      2  i_code number(5),
      3  i_desc varchar2(35),
      4  i_op myTest);
    Table created.
    SQL> insert into imst values(1,'Hawkins cooker', mytest(user,sysdate,'',''));
    1 row created.
    SQL> select * from imst;
        I_CODE I_DESC
    I_OP(INS_BY, INS_ON, UPD_BY, UPD_ON)
             1 Hawkins cooker
    MYTEST('APC_LOAD', '12-JUL-04', NULL, NULL)
    SQL> update imst i set i.i_op.upd_by = USER, i.i_op.upd_on = add_months(sysdate, 1);
    1 row updated.
    SQL> select * from imst;
        I_CODE I_DESC
    I_OP(INS_BY, INS_ON, UPD_BY, UPD_ON)
             1 Hawkins cooker
    MYTEST('APC_LOAD', '12-JUL-04', 'APC_LOAD', '12-AUG-04')
    SQL> Smoke me a kipper I'll be back before breakfast.
    Cheers, APC

  • Object tables and procedures.

    Hi! I apologize in advance if my question is too trivial. I'm building simple object-relational database, and i would like to move a lot of my programming logic into database. I plan to build object tables based on object types that contain not only attributes but also functions and procedures. Now for example, i have object type "product" that contains some atributes like id ,name, price..., and let say procedure LowerThePrice(Percentage NUMBER) that should change the actual data.
    Now i create table Products of type product and fill it with some data. The question is how can i call/apply this procedure LowerThePrice on rows of products object table? If this scenario is even possible, how can i call that procedure using sql plus, and VB.net 2005 (i have installed and configured ODP.NET and oracle 11g).
    Thanks!

    1. Has been mentioned before - we do have a bug on it. To search across all your pl/sql, there is a report you can use.
    2. We are working on improving errors but I can't make any promises.
    3. We have heard this before but it won't be there for v1.0. You can use the Connections navigator to access the details of the objects that are accessible to you while you have a Worksheet open. You can even drag your Worksheet tab down to place it under the Connections details tab so you can see them both at the same time.
    4. In a post-v1.0 release, we will be looking at additional, alternate navigation.
    5. We have an open bug to not prompt you for the same bind more than once.
    6. I will talk to the Worksheet developer about this one. Not sure we can remember the binds from execution to execution but it would be a great enhancement.
    7. Not sure why this is failing - I will check into it.
    -- Sharon

  • Object tables and stored proecedures

    I am trying to find something about retrieving data from object tables using functions/stored procedures. I have tried a couple of things but, my code throws an "illegal column datatype" error when I try to fill the dataset.
    I am sure there is a way to do have a function or SP return object types to C# code, what ways work best?
    Thanks in advance,

    You could use a result set...I have done this using Pipelined functions that return a table of objects and used the Table() function to wrap the function return as a table in a select statement...
    open cursor for select * from table(my_function)
    where my_function returns a table of objects (see pipelined row functions).
    You may be able to reference your object directly (Ref / Value) if it is a nested object.

  • Help ! Cannot retrieve Object table data from Oracle 8i

    Dear All,
    Created the object and object table in SQL*Plus. If query from SQL*Plus, return rows selected.
    But if query from SQL*Plus worksheet and ODBC Test program, return "0 rows selected".
    Similary, if created the object and object table in SQL*Plus worksheet and query from SQL*Plus worksheet, return rows selected.
    But if query from SQL*Plus or ODBC Test program, return "0 rows selected".
    Appreciate advice from anyone. Thanks in advance.
    Oracle version. 8i Enterprise Edition Release 2
    Scrip to create object and insert record:
    CREATE TYPE stockitem_objtyp AS OBJECT (
    STOCKNO NUMBER,
    PRICE NUMBER,
    TAXRATE NUMBER
    CREATE TABLE stock_objtab of stockitem_objtyp (stockno primary key) object id primary key;
    INSERT INTO Stock_objtab VALUES (1, 1000, 3);
    select * from stock_objtab;
    null

    First, I suspect that this question probably belongs on the ODBC forum, since it doesn't appear to be at all related to the JVM.
    That said, I don't seem to have any problem retrieving the data, either through ODBC or SQL*Plus. If you post your question to the ODBC forum, perhaps some other folks will be able to try this and we can narrow down the problem.
    Justin Cave
    ODBC Development

  • Function based indexes on object tables

    Hi,
    I am trying to create a function based index on an object table. I am getting the following error:
    SQL> create index cell1_indx on cell1(create_cell1(id)) indextype is mdsys.spatial_index;
    create index cell1_indx on cell1(create_cell1(id)) indextype is mdsys.spatial_index
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Stmt-Execute Failure: SELECT num_rows from all_tables where owner='ASHE' and table_name=
    'CELL1'
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Here cell1 is an object table.
    Is the procedure for creating function based indexes on object tables different from relational tables?
    Chinni

    One of the many new features in Oracle 8i is the Function-Based Index (we will refrain from using FBI, but only just). This allows the DBA to create indexes on functions or expressions; these functions can be user generated pl/sql functions, standard SQL functions (non-aggregate only) or even a C callout.
    A classic problem the DBA faces in SQL Tuning is how to tune those queries that use function calls in the where clause, and result in indexes created on these columns not to be used.
    Example
    Standard B-Tree index on SURNAME with cost based optimizer
    create index non_fbi on sale_contacts (surname);
    analyze index non_fbi compute statistics;
    analyze table sale_contacts compute statistics;
    SELECT count(*) FROM sale_contacts
    WHERE UPPER(surname) = 'ELLISON';
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=3 Card=1 Bytes=17)
    1 0 SORT (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'SALES_CONTACTS' (Cost=3 Card=16 Bytes=272)
    Now we use a function based index
    create index fbi on sale_contacts (UPPER(surname));
    analyze index fbi compute statistics;
    analyze table sale_contacts compute statistics;
    SELECT count(*) FROM sale_contacts WHERE UPPER(surname) = 'ELLISON';
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=17)
    1 0 SORT (AGGREGATE)
    2 1 INDEX (RANGE SCAN) OF 'FBI' (NON-UNIQUE) (Cost=2 Card=381 Bytes=6477)
    The function-based index has forced the optimizer to use index range scans (retuning zero or more rowids) on the surname column rather than doing a full table scan (non-index lookup). Optimal performance does vary depending on table size, uniqueness and selectivity of columns, use of fast full table scans etc. Therefore try both methods to gain optimal performance in your database.
    It is important to remember that the function-based B*Tree index does not store the expression results in the index but uses an "expression tree". The optimizer performs expression matching by parsing the expression used in the SQL statement and comparing the results against the expression-tree values in the function-based index. This comparison IS case sensitive (ignores spaces) and therefore your function-based index expressions should match expressions used in the SQL statement where clauses.
    Init.ora Parameters
    The following parameter must be set in your parameter file: QUERY_REWRITE_INTEGRITY = TRUSTED
    QUERY_REWRITE_ENABLED = TRUE
    COMPATIBLE = 8.1.0.0.0 (or higher)
    Grants
    Grants To create function-based indexes the user must be granted CREATE INDEX and QUERY REWRITE, or alternatively be granted CREATE ANY INDEX and GLOBAL QUERY REWRITE. The index owner must have EXECUTE access on the function used for the index. If execute access is revoked then the function-based index will be "disabled" (see dba_indexes).
    Disabled Indexes
    If your function-based index has a status of "disabled" the DBA can do one of the following:
    a) drop and create the index (take note of its current settings)
    b) alter index enable, function-based indexes only, also use disable keyword as required
    c) alter index unusable.
    Queries on a DISABLED index fail if the optimizer chooses to use the index.Here is an example ORA error:
    ERROR at line 1: ORA-30554: function-based index MYUSER.FBI is disabled.
    All DML operations on a DISABLED index also fail unless the index is also marked UNUSABLE and the initialization parameter SKIP_UNUSABLE_INDEXES is set to true.
    Some more Examples
    CREATE INDEX expression_ndx
    ON mytable ((mycola + mycolc) * mycolb);
    SELECT mycolc FROM mytable
    WHERE (mycola + mycolc) * mycolb <= 256;
    ..or a composite index..
    CREATE INDEX example_ndx
    ON myexample (mycola, UPPER(mycolb), mycolc);
    SELECT mycolc FROM myexample
    WHERE mycola = 55 AND UPPER(mycolb) = 'JONES';
    Restriction & Rule Summary
    The following restrictions apply to function based indexes. You may not index:
    a) LOB columns
    b) REF
    c) Nested table column
    d) Objects types with any of the above data types.
    Function-based indexes must always follow these rules:
    a) Cost Based optimizer only, must generate statistics after the index is created
    b) Can not store NULL values (function can not return NULL under any circumstance)
    c) If a user defined pl/sql routine is used for the function-based index, and is invalidated, the index will become "disabled"
    d) Functions must be deterministic (always return the same value for a known input)
    e) The index owner must have "execute" access on function used in the function-based index. Revocation of the privilege will render the index "disabled"
    f) May have a B-Tree and Bitmap index type only
    g) Can not use expressions that are based on aggregate functions, ie. SUM, AVG etc.
    h) To alter a function-based index as enabled, the function used must be valid, deterministic and the signature of the function matches the signature of the function when it was created.
    Joel P�rez

  • How to implement search help instead of match code objects table in program

    Hi,
    We are now in upgrade process of code remediation ( From 4.6c to EC6.0).
    We have created search helps instead of matchcode object table. This match code object table M_VMVLC has been deleted
    in EC6.0.  And search help VMVLC is available.
    In the program, they have used <M_VMVLC > -<fieldname> i.e. <tablename> - <fieldname> in declaring parameters,
    in the 'into' clause of select statement, in the 'from' clause of select statement, in the 'write' statement.
    I want to know how to replace this matchcode object table with the search help in the program.
    Thanks,
    Abirami.

    Hi,
    Check the link
    http://help.sap.com/saphelp_nw04/helpdata/EN/cf/21ee2b446011d189700000e8322d00/content.htm
    Regards,
    Amit

  • Insert/Update/Delete in forms6i using Objects table in Oracle9i server

    I am using Oracle 9i server and dev 6i (forms6i).
    i have a form based on Object tables (including REF's items). when i try to insert update, delete the reocrd in the form, it gives error.
    Insert/Update/Delete failed because of OCI_22132: hexadecimal string does not corresopond to a valid REF.
    when i remove REFs items from form (not from database) then it does all functions (insert,update,delete,query).
    Actually i haved used this form with Oracle 8i and it did all functions(insert,update,delete,query). i am using the same tables and types definations in Oracle 9i but it is not working.
    Note: Insert, Update, Delete, or Query is not being done through forms when using REFs items. Others tools like sql*plus are performing the same actions very well.
    Please help.
    I will be thankful to you.
    M. Faisal.

    user563114,
    As James (padders) told you in his reply to a similar question that you posted (Typed tables is treated in the same way as a relational table?) in the Typed tables is treated in the same way as a relational table? forum, the only way you can tell for sure is to try it out both ways, measure and compare the times.
    Of-course, there are many factors that effect the time, apart from whether you use a nested table or a regular table.
    Good Luck,
    Avi.

Maybe you are looking for