Union of tables to give a spatial view

I have a series of tables that i am trying to join together and display in a view. Some of them have a slightly different structure. They all have either a east/north, easting or northing, or a centrex and centrey. I then want the centroids for each polygon. If i run the select statements seperatly they select what i want, however when i put a union in it gives the following error message :
ERROR at line 1:
ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object
type
The SQL is as follows :
CREATE or REPLACE VIEW ALLSITES_V AS
select
'SSSI' desg,SSSI_NAME site_name,SSSI_ID site_code,EAST CENTREX,NORTH CENTREY,TO_NUMBER(sssi_id) isis_id,MI_STYLE,MI_PRINX,GEOLOC,sdo_geom.sdo_centroid(geoloc,0.001)
from SSSI
union
select
'SPA' desig,SPA_NAME site_name,SPA_CODE site_code,EASTING CENTREX,NORTHING CENTREY,ISIS_ID isis_id,MI_STYLE,MI_PRINX,GEOLOC,sdo_geom.sdo_centroid(geoloc,0.001)
from SPA
union
select
'RAMSAR' desg,RAMSAR_NAME site_name,RAMSAR_CODE site_code,EASTING CENTREX,NORTHING CENTREY,ISIS_ID isis_id,MI_STYLE,MI_PRINX,GEOLOC,sdo_geom.sdo_centroid(geoloc,0.001)
from RAMSAR
union
select
'SAC' desg,SAC_NAME site_name, SITE_CODE site_code,ISIS_ID isis_id,CENTREX,CENTREY,MI_STYLE,MI_PRINX,GEOLOC,sdo_geom.sdo_centroid(geoloc,0.001)
from SAC
I am assuming it is because i have not used the SDO_GEOM function in it's correct format. I would also like the view to show the centrex and y and also the MBR. It is will be used when passed through a WMS. I have missed out something fairly fundermental but i am not sure how to incorperate it.

Hi,
I created view:
CREATE OR REPLACE VIEW VIEW_ALL as
SELECT
ID, GEOMETRIE_ZNACKA as GEOMETRIE
FROM
TAB_A
WHERE
GEOMETRIE_ZNACKA is not null
UNION ALL
SELECT
ID, GEOMETRIE_SIPKA as GEOMETRIE
FROM
TAB_B
WHERE
GEOMETRIE_SIPKA is not null
I inserted geometry metadata:
insert into mdsys.user_sdo_geom_metadata (table_name,column_name,diminfo,SRID)
values ('VIEW_ALL','GEOMETRIE',MDSYS.SDO_DIM_ARRAY (MDSYS.SDO_DIM_ELEMENT('X',431700, 904600,0.01),
MDSYS.SDO_DIM_ELEMENT('Y',935200, 1227300,0.01)),2065);
Tables TAB_A and TAB_B have spatial index on column with geometry.
When I view the view VIEW_ALL in the spatial view (Georaptor) we get an error "ORA-01446".
Geometry data of tables TAB_A and TAB_B (directly) is viewed in spatial view (Georaptor) corectly.
Thanks
Petr Soucek

Similar Messages

  • Data Federator:  Unioning Multiple Tables into single view possible?

    Hi,
    I have three different databases with tables containing a portion of the same kind of data and I want to union the three different tables together in Data Federator to present a single logical view that has the complete set of data.  Is this possible in Data Federator?  How would I go about doing that?
    Note: I do not have keys to join the tables together on since it's not simply extending the data in one table with additional data in another table and doing an inner join on a unique key.  Instead, for example, there's a customer table for Finance, a customer table for Operations and a customer table for Sales and they all contain the same columns (with maybe slightly different names) and same type of data.  I want to effectively union Finance, Operations and Sales together in a federated/virtualized view so applications can just query from that view to get all the customers from the three different databases.
    I have been unable to do this so far since Data Federator requires each table in a mapping to have a relationship with the other tables in the mapping.
    Thanks for the help.
    Kerby

    I figured out the original question using one mapping for each table but have a new question now. 
    Is it possible for an application to use the combined view from Data Federator to write back into the databases?
    e.g. have an application use the target table in Data Federator and view the results, and based on that update the data in the underlying database that provides the data for the target table?
    Thanks for the help.
    Kerby

  • DB view for union of table

    hi guys.
    Is it possibile to create an ABAP DataBase view for an UNION ALL of 2 tables with same fields ?
    From SE11 is possible to create only joined tables, i think...is it true ?
    I must split records of one custom table into two tables (active records and archived records); so, i thought to create an union all (view) to semplify modification on abap programs needs both tables's record.
    thanks a lot.

    hi.
    Thanks for confirmation it isn't possible to create union on abap DB view (se11).
    for Yukonkid:
    - on sql-92 "union join" is included
    - "SELECT form both tables and "union" them in an internal table"...a DB view intend to be a same solution but more easy to develop (easy=few abap's rows)
    for Sneha:
    my target is performance: i have a big table (a lot of rows) with 95% archived and using index not resulted a good solution
    bye

  • Sdo_filter fail when query against a spatial view in different schema

    We have a table with X,Y coordinates and would like to run spatial query against it. We do not want to change the table structure, so we opt to use a function based index. USER_SDO_GEOM_METADATA is updated and index is built. Then we created a view with spatial column from the table. Everything works fine with the user who owns the table and view.
    When we try to run a spatial query against the view from a different user, it failed with error. However, if we substitute the select from my_view* with the actual SQL statement that created the view, it works. So it looks like Oracle refuse to acknowledge the spatial index if accessed via view. Here is some simplified scripts:
    --- connect as USER1.
    --update meta data
    INSERT INTO USER_SDO_GEOM_METADATA ( TABLE_NAME, COLUMN_NAME, DIMINFO, SRID ) VALUES
    ('LOCATIONS', 'MDSYS.SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL)',
    SDO_DIM_ARRAY( SDO_DIM_ELEMENT('X', 1300000, 1600000, 1), SDO_DIM_ELEMENT('Y', 400000, 700000, 1) ), 2264 );
    --created index
    CREATE INDEX LOCA_XYGEOM_IDX ON LOCATIONS
    ( SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL)
    ) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    --create view
    CREATE VIEW USER1.MY_VIEW AS SELECT ID ,X_COORD,Y_COORD, SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL) SHAPE
    FROM USER1.LOCATIONS WHERE X_COORD>0 AND Y_COORD>0;
    -- run spatial query from view, works fine by user1 by failed on user2.
    SELECT SHAPE FROM (
    SELECT * FROM USER1.MY_VIEW
    ) a WHERE sdo_filter (shape, sdo_geometry ('POLYGON ((1447000 540000, 1453000 540000, 1453000 545000, 1447000 545000, 1447000 540000))', 2264), 'querytype=window') = 'TRUE';
    -- run spatial query from table directly, simply replace the view with actual statements that created the view. works fine by user1 AND user2.
    SELECT SHAPE FROM (
    SELECT ID ,X_COORD,Y_COORD, SDO_GEOMETRY(2001,2264,SDO_POINT_TYPE(NVL(X_COORD,0),NVL(Y_COORD,0),NULL),NULL,NULL) SHAPE
    FROM USER1.LOCATIONS WHERE X_COORD>0 AND Y_COORD>0
    ) a WHERE sdo_filter (shape, sdo_geometry ('POLYGON ((1447000 540000, 1453000 540000, 1453000 545000, 1447000 545000, 1447000 540000))', 2264), 'querytype=window') = 'TRUE';
    When run against the view by user2, the error is:
    ORA-13226: interface not supported without a spatial index
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ORA-06512: at "MDSYS.SDO_3GL", line 1173
    13226. 00000 - "interface not supported without a spatial index"
    *Cause:    The geometry table does not have a spatial index.
    *Action:   Verify that the geometry table referenced in the spatial operator
    has a spatial index on it.
    Note, the SELECT SHAPE FROM (****) A WHERE SDO_FILTER(....) syntax is a third party application, all we have control is the part inside "(select ...)".
    So it appears Oracle is treating view differently. Have attempted fake the view name into USER_SDO_GEOM_METADATA, did not work. Also, granted select on the index table to user2, did not work.
    if we re-created the view in user2 schema, it worked for user2 but not user1, so it's not something we can do for every user.
    Searched the forum, no good match found. A few posts talked about "union all" in view caused the problem but I do not have the union.
    We are only use Oracle 10g Locator, not full spatial edition.
    Any ideas?
    Thanks!
    Edited by: liu.284 on Oct 4, 2011 12:08 PM

    It seems a bug, where a function-based spatial index is not correctly handled in a view query transformation.
    Not sure if the following works for you or not.
    add a new column "shape" (mdsys.sdo_geometry) in table locations, use a trigger and x_coord/y_coord
    to set values for this new column, and just create a normal spatial index on this new column. (drop the
    function-based spatial index). And create a view like:
    CREATE VIEW USER1.MY_VIEW2 AS SELECT ID , X_COORD, Y_COORD, SHAPE
    FROM USER1.LOCATIONS WHERE X_COORD>0 AND Y_COORD>0;

  • Text Index works fine consistently with Table, but not on underlying View

    Hi,
    We are facing weird issue relating to Oracle Text Indexes. Search using Oracle Text Index
    works fine on a Table, but when running query on View it gives sometimes (not consistently)
    ORA-20000: Oracle Text error:
    DRG-10849: catsearch does not support functional invocation
    DRG-10599: column is not indexed
    Sometimes it works.
    All of the below steps are run using User IR2OWNER:
    STEP 1: Table CPF_CUSTOMER created as follows (3 Non Text Indexes defined at time of creation )
    **Please note no Public Synonym is created for this Table**
    ** There is already another Table by same name CPF_CUSTOMER under different Owner (CDROWNER)
    and that Table has Public Synonym CPF_CUSTOMER created. Other Table CPF_CUSTOMER does not
    have any Views **
    create table CPF_CUSTOMER
    CPF_CUSTOMER_UUID NUMBER(20) not null,
    SAP_ID VARCHAR2(10 CHAR) not null,
    IRIS2_ID VARCHAR2(7 CHAR),
    NAME VARCHAR2(70 CHAR) not null,
    DRAFT_IND NUMBER(1) not null,
    ACTIVE_IND NUMBER(1) not null,
    REPLACED_BY_CUST VARCHAR2(10 CHAR),
    CRE_DT_GMT DATE,
    CRE_DT_LOC DATE,
    TIME_ZONE VARCHAR2(3 CHAR),
    CRE_USR VARCHAR2(8 CHAR),
    CHG_DT_GMT DATE,
    CHG_DT_LOC DATE,
    CHG_TIME_ZONE VARCHAR2(3 CHAR),
    CHG_USR VARCHAR2(8 CHAR),
    VFY_DT_GMT DATE,
    VFY_DT_LOC DATE,
    VFY_USR VARCHAR2(8 CHAR),
    DIVISION VARCHAR2(20 CHAR),
    SALES_ADMIN VARCHAR2(3 CHAR),
    MF_CUST_CDE VARCHAR2(14 CHAR),
    CR_CTRL_OFCE VARCHAR2(3 CHAR),
    DEFAULT_INV_CCY VARCHAR2(3 CHAR),
    AUTOBILL_OVRRD_IND NUMBER(1) not null,
    AUTOBILL NUMBER(1) not null,
    AUTOPRT_OVRRD_IND NUMBER(1) not null,
    AUTOPRT NUMBER(1) not null,
    AVE_PYMT_DAY NUMBER(3),
    TTL_INV_VAL NUMBER(12,2),
    INHERIT_CR_TERM_ASSGMT NUMBER(1) not null,
    NORMALIZED_NME VARCHAR2(70 CHAR),
    OB_PYMT_OFCE VARCHAR2(3 CHAR),
    IB_PYMT_OFCE VARCHAR2(3 CHAR),
    CGO_SMART_ID VARCHAR2(20 CHAR),
    REC_UPD_DT TIMESTAMP(6),
    NCPF_CUST_ID VARCHAR2(7) not null,
    CPF_CUST_LEVEL_UUID NUMBER(20) not null
    tablespace DBCPFP1_LG_DATA LOGGING;
    CREATE UNIQUE INDEX CPF_CUSTOMERI1 ON CPF_CUSTOMER
    (SAP_ID ASC) TABLESPACE DBCPFP1_LG_INDX;
    ALTER TABLE CPF_CUSTOMER
    ADD CONSTRAINT CPF_CUSTOMERI1 UNIQUE (SAP_ID);
    CREATE UNIQUE INDEX CPF_CUSTOMERI2 ON CPF_CUSTOMER
    (CPF_CUSTOMER_UUID ASC) TABLESPACE DBCPFP1_LG_INDX;
    ALTER TABLE CPF_CUSTOMER
    ADD CONSTRAINT CPF_CUSTOMERI2 UNIQUE (CPF_CUSTOMER_UUID);
    CREATE INDEX CPF_CUSTOMER_IDX2 ON CPF_CUSTOMER (UPPER(NAME))
    TABLESPACE DBCPFP1_LG_INDX;
    STEP 2: Create View CPF_CUSTOMER_RVW on above Table (and Public Synonym on View)
    This View is created under same OWNER as Table created in STEP 1 (IR2OWNER)
    create or replace view cpf_customer_rvw as
    select
    CPF_CUSTOMER_UUID,
    SAP_ID,
    IRIS2_ID,
    NAME,
    DRAFT_IND,
    ACTIVE_IND,
    REPLACED_BY_CUST,
    CRE_DT_GMT,
    CRE_DT_LOC,
    TIME_ZONE,
    CRE_USR,
    CHG_DT_GMT,
    CHG_DT_LOC,
    CHG_TIME_ZONE,
    CHG_USR,
    VFY_DT_GMT,
    VFY_DT_LOC,
    VFY_USR,
    DIVISION,
    SALES_ADMIN,
    MF_CUST_CDE,
    CR_CTRL_OFCE,
    DEFAULT_INV_CCY,
    AUTOBILL_OVRRD_IND,
    AUTOBILL,
    AUTOPRT_OVRRD_IND,
    AUTOPRT,
    AVE_PYMT_DAY,
    TTL_INV_VAL,
    INHERIT_CR_TERM_ASSGMT,
    NORMALIZED_NME,
    OB_PYMT_OFCE,
    IB_PYMT_OFCE,
    CGO_SMART_ID,
    NCPF_CUST_ID,
    CPF_CUST_LEVEL_UUID,
    REC_UPD_DT
    from CPF_CUSTOMER;
    CREATE OR REPLACE PUBLIC SYNONYM CPF_CUSTOMER_RVW FOR CPF_CUSTOMER_RVW;
    STEP 3: Insert Test row
    insert into cpf_customer (CPF_CUSTOMER_UUID, SAP_ID, IRIS2_ID, NAME, DRAFT_IND, ACTIVE_IND, REPLACED_BY_CUST, CRE_DT_GMT, CRE_DT_LOC, TIME_ZONE, CRE_USR, CHG_DT_GMT, CHG_DT_LOC, CHG_TIME_ZONE, CHG_USR, VFY_DT_GMT, VFY_DT_LOC, VFY_USR, DIVISION, SALES_ADMIN, MF_CUST_CDE, CR_CTRL_OFCE, DEFAULT_INV_CCY, AUTOBILL_OVRRD_IND, AUTOBILL, AUTOPRT_OVRRD_IND, AUTOPRT, AVE_PYMT_DAY, TTL_INV_VAL, INHERIT_CR_TERM_ASSGMT, NORMALIZED_NME, OB_PYMT_OFCE, IB_PYMT_OFCE, CGO_SMART_ID, NCPF_CUST_ID, CPF_CUST_LEVEL_UUID, REC_UPD_DT)
    values (2.26283572796028E15, '6588125000', '6588125', 'S M Mooseen And Sons(PVT) Limited', 0, 1, '', to_date('15-03-2005 08:55:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('15-03-2005 14:25:00', 'dd-mm-yyyy hh24:mi:ss'), 'IST', 'licr2', to_date('19-02-2007 00:33:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('19-02-2007 06:03:00', 'dd-mm-yyyy hh24:mi:ss'), 'IST', 'BaseAdmi', to_date('15-03-2005 09:03:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('15-03-2005 14:33:00', 'dd-mm-yyyy hh24:mi:ss'), 'ninwasa', '', '', 'SRI06588125000', '463', '', 0, 0, 0, 0, null, null, 0, 'SMMOOSEENANDSONSPVTLIMITED', '', '', '', '6588125', 109966195050333, '14-JAN-09 02.49.28.325774 PM');
    commit;
    STEP 4: Create Oracle Text Index on Table CPF_CUSTOMER
    EXEC CTX_DDL.DROP_PREFERENCE('CTXCAT_IR2_STORAGE');
    EXEC CTX_DDL.CREATE_PREFERENCE('CTXCAT_IR2_STORAGE', 'BASIC_STORAGE');
    EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'I_INDEX_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
    EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'I_INDEX_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
    EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'K_TABLE_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
    EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'R_TABLE_CLAUSE', 'TABLESPACE COMMON_SM_INDX COMPRESS 2');
    EXEC CTX_DDL.SET_ATTRIBUTE('CTXCAT_IR2_STORAGE', 'I_ROWID_INDEX_CLAUSE', 'TABLESPACE COMMON_SM_INDX storage (INITIAL 5M)');
    -- Define IR2_AB_LEXER to handle Special Characters.
    EXEC ctx_ddl.drop_preference('IR2_AB_LEXER');
    EXEC ctx_ddl.create_preference('IR2_AB_LEXER', 'BASIC_LEXER');
    EXEC ctx_ddl.set_attribute ('IR2_AB_LEXER', 'printjoins', ',_!$~%?=({;|&+-:/)}.@`^');
    --Drop Indexes
    drop index CPF_CUSTOMER_DIDX1;
    -- CATSEARCH INDEX on CPF_CUSTOMER.NAME     
    CREATE INDEX CPF_CUSTOMER_DIDX1 ON CPF_CUSTOMER(NAME) INDEXTYPE IS CTXSYS.CTXCAT PARAMETERS ('STORAGE CTXCAT_IR2_STORAGE STOPLIST CTXSYS.EMPTY_STOPLIST LEXER IR2_AB_LEXER');
    commit;
    STEP 5: Run Query to use Oracle Text Index on Base Table (works fine always. No issues seen so far)
    SELECT a.sap_id||'|'||a.name||'|' CUSTOMER_STR
    FROM cpf_customer a
    WHERE (catsearch(a.name, 'Mooseen'||'*', '')>0);
    CUSTOMER_STR
    6588125000|S M Mooseen And Sons(PVT) Limited|
    STEP 6: Run Query to use Oracle Text Index on View created under Table (get below error periodically)
    ORA-20000: Oracle Text error:
    DRG-10849: catsearch does not support functional invocation
    DRG-10599: column is not indexed
    But it works sometimes as in STEP 5 and returns 1 row. It is never consistent. We would like to
    provide access to this Table using View only. That is why we would like to get this query working consistently
    using View.
    Any help or tips would be greatly appreciated
    Thanks
    Auro

    This is a known issue with CTXCAT indexes. Sometimes the optimizer will "drive" the query off another index, and request results from the CTXCAT index on a row-by-row basis ("does the row with rowid NNNN satisfy this CATSEARCH condition?"). That's known as a functional lookup, and is not supported by the CTXCAT indextype.
    The only solution is to try to persuade the optimizer to use a different plan which does not use a functional lookup. This can be achieved by the use of hints, or sometimes by collecting or deleting statistics on the table.

  • How to produce a table of contents by using view

    How to produce a table of contents by using view

    I dont understand what u want to know, just give an example ! !

  • Spatial view in sql server

    Hi everybody 
                i want to create spatial view in the sqlserver 2008 . i m creating relationship between entity . i m pasting my sql query :
    SELECT     sde.STATE.OBJECTID, sde.STATE.StateID, sde.STATE.StateName, sde.STATE.SHAPE, SUM(sde.Population.Population) AS Expr1
    FROM         sde.STATE INNER JOIN
                          sde.Population INNER JOIN
                          sde.TEHSIL ON sde.Population.TehsilID = sde.TEHSIL.TehsilID INNER JOIN
                          sde.DISTRICT ON sde.TEHSIL.DistrictID = sde.DISTRICT.DistrictID ON sde.STATE.StateID = sde.DISTRICT.StateID
    GROUP BY sde.STATE.OBJECTID, sde.STATE.StateID, sde.STATE.StateName, sde.STATE.SHAPE
    when i try to save this query it gives the error .
    The type "gemometry " is not comparable .It can not be used in the GROUP BY clause.
    when i not include shape in GROUP BY clause it gives following error
    Column 'sde.STATE.SHAPE ' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause
    please if any one has created just informed me

    Should just be a matter of doing the aggregation in a subquery.  Try:
    SELECT  sde.STATE.OBJECTID     
          , sde.STATE.StateID     
          , sde.STATE.StateName     
          , sde.STATE.SHAPE,     
          , q1.SumOfPopulation     
    FROM    sde.STATE      
            JOIN (      
                    SELECT   StateID,     
                           , SUM(sde.Population.Population) as SumOfPopulation     
                    FROM     sde.STATE      
                             JOIN sde.DISTRICT ON sde.STATE.StateID = sde.DISTRICT.StateID     
                             JOIN sde.TEHSIL ON sde.TEHSIL.DistrictID = sde.DISTRICT.DistrictID    
                             JOIN sde.Population ON sde.Population.TehsilID = sde.TEHSIL.TehsilID  
                    GROUP BY StateID  
             ) q1 ON q1.StateID = sde.STATE.StateID    

  • Table that gives PO items

    Hello,
    First of all, I'm totally new in Web Dynpro so this question is probably easy to answer for most of you...
    The goal is to display a table that gives several items from a PO.
    What I did:
    I made a service call for BAPI_PO_GETITEMS, IMPORTING purchaseorder, CHANGING PO_ITEMS.
    In my view => Context I added a default value for the purchase attribute (3000000050) which is an existing PO number in the system.
    I then went to Layout, used the wizard to add a table and selected the fields I want to show in the table (with binding checkbox).
    When I run this it's not showing me any values though, it's showing me an empty table with the correct columns (the ones I selected). I made sure PO number 3000000050 contains items.
    I'd appreciate if someone could help me with this
    Best regards,
    PJ

    Hello,
    First of all thanks for your replies.
    Yes the BAPI returns all fields but I also have all the fields in my note (the service call did that automatically). I'm just not using all the fields in my table (didn't bind them all, removed the checkbox for quite some).
    About the debugging: what I did was open WDDOINIT and put a breakpoint there. When testing the window (connected to the view) I came in debugger but I could not find anything in it, it's basically all empty fields. When I put my breakpoint in the componentcontroller -> methods -> execute_bapi_po_getitems my debugger doesn't even start.
    I guess that means the execute_bapi_po_getitems is never called? Should I put that in WDDOINIT?
    If I put my EXECUTE_BAPI_PO_GETITEMS in WDDOINIT it tells me EXECUTE_BAPI_PO_GETITEMS is unknown or protected or private. That's probably because EXECUTE_BAPI_PO_GETITEMS is in my custom controller?
    Edited by: PJ Deraedt on Oct 16, 2009 1:30 PM

  • I am new to Service module,can anybody give the over view of service module

    I am new to Service module,can anybody give the over view of service module including base table and Relation ship with other Oracle Application module.

    Hello Les,
    Think that you want to buy television or computer and how will you proceed for that.
    1. Material Requirement : Your family will ask you that they need television so that is material requirement from the users (family), they will also give additional information like what is the size of TV, which brand etc
    2. Quotation (Inquiry) : now you have requirement that you need one TV so you will looking for different vendors i.e. Phillips, Sharp, AIWA, Deawood and ask them to give the prices and other terms (free shipping, service after sales ) for TV
    3. Quotation comparision : Once you get the price from all your supplier, you will make comparision on price and other terms also you can negotiate the price with vendor asking for discounts, free door delivery
    4. Vendor Selection: Based on your negotiation you will identify the best deal and place order to that vendor.
    5. Purchase order : You will place order to vendor asking for material (TV), for certain price on particular date at particular location (you home).
    6. Goods Receipt : Once vendor delivers TV then you will receive the material at your location
    7. Invoice receipt: Vendor will send the invoice with that delivery and you will check the price and make the payment to vendor,
    I hope this will help you to under stand the concept of Procurment cylce.
    More details you can get it from the link which I provided.
    Regards
    Arif Mansuri

  • While perform Action on Selected Rows in trinidad Tables it gives Nullpoint

    I created one table with Multiple row selection on JSF page with one Button Update.on_click of that button i am getting below Exception.
    For reference I am posting code here.
    Table::
    <af:form>
    <af:panelStretchLayout....
    <tr:table binding="#{mybean.table}" rowselection="multiple" ...>
    </tr:table>
    <tr:commandButton text="Update" actionListener="#{mybean.performUpdate}"/>
    Mybean.performUpdate::
    public void performUpdate(ActionEvent actionEvent) {
    List list=new ArrayList();
    UIXTable table = getTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    Object oldKey = table.getRowKey();
    while(selection.hasNext())
         Object rowKey = selection.next();
              table.setRowKey(rowKey);
              MyRowImpl row = (MyRowImpl) table.getRowData();
              //custom method exposed on an implementation of Row interface.
              row.markForDeletion();
    Exception::
    java.lang.NullPointerException
         at org.apache.myfaces.trinidad.model.RowKeySet.add(RowKeySet.java:129)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSelectManyRenderer._setDeltas(TableSelectManyRenderer.java:161)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSelectManyRenderer.decode(TableSelectManyRenderer.java:113)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.decodeSelection(TableRenderer.java:138)
         at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.decode(TableRenderer.java:102)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1089)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:714)
         at org.apache.myfaces.trinidad.component.UIXTable.decode(UIXTable.java:136)
         at org.apache.myfaces.trinidad.component.UIXCollection.processDecodes(UIXCollection.java:193)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:812)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:812)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:75)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:970)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:956)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:812)
         at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1015)
         at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:504)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1113)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:293)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:85)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:257)
         at oracle.security.jps.wls.JpsWlsSubjectResolver.runJaasMode(JpsWlsSubjectResolver.java:250)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:100)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Hi Timo,
    Thanks for reply .
    I am using Jdev11g.
    I also tried Debug and what i observer is
    1)If i drop trinad table it gives above error before catching debug point in action.
    2)If i use <af:table ... i am able to catch debug point but it give null value on step UIXTable table = getTable() in above code.
    Please suggest me how to use trinidad table for multiple row selection functionality bcz it satisfy my requirement.

  • Slow SDO_RELATE operation on a spatial view

    Hi Folks,
    I need some help to understand what's going on with a spatial query that is taking so long to be executed (about 7 minutes).
    I have a spatial view as below:
    create or replace view v_lote_fiscal_relac as
    select
    lf.objectid,lf.numbloco,lf.setor,lf.quarteirao,lf.origem,lf.tipo,lf.nome,lf.superquadra,lf.quadra,lf.area,lf.observacao,lf.motivo,lf.data,lf.matricula,
    vlf.idf_lote,vlf.ind_tipo_lote,vlf.num_lote,vlf.num_seq_lote,vlf.num_setor,vlf.num_quarteirao,vlf.mtr_area_real,vlf.des_tipo_categoria,
    lf.geom
    from
    GEOSMFAGP.Lote_Fiscal lf, IMO_VW_LOTE_FISCAL@POAGEO vlf
    where
    retorna_num_lote(lf.numbloco) = vlf.num_lote AND
    retorna_num_seq_lote(lf.numbloco) = vlf.num_seq_lote;
    The functions retorna_num_lote and retorna_num_seq_lote just do a substr to extract information from lf.numbloco column
    This is the spatial query created by a mapping application
    SELECT
    OBJECTID
    FROM
    GEOPONTO.V_LOTE_FISCAL_RELAC T
    WHERE
    SDO_RELATE(T.GEOM,
    SDO_GEOMETRY(2003,1010101,NULL,
    SDO_ELEM_INFO_ARRAY(1,1003,1),
    SDO_ORDINATE_ARRAY(180514.7833451195,1663508.6932339652,
    180514.84948680276,1663504.0633161366,
    180517.6274375,1663503.9971744534,
    180517.69357918325,1663508.4948089155,
    180514.7833451195,1663508.6932339652)), 'mask=ANYINTERACT') = 'TRUE'
    Please, correct me if I'm wrong, but it looks like the query will first get all the records that satisfy the where clause and then apply the spatial filter on this resultset.
    How can it be improved?
    I did some tests using SQL Developer (SQL Profiler) and it was possible to create a better execution plan to this query. The time was reduced to 4 seconds.
    But the SQL Profile seems to have effect only to the query analyzed. I mean, if a change the sdo_geometry parameter, the query takes 7 minutes again.
    Any ideas?
    Regards,
    Luis

    Hi Stefan,
    Please, see below the Explain Plan that I mentioned and the SQL Profiler command that makes the query be executed very fast.
    *1- Original*
    Plan hash value: 2780585567
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | 4808 | 1596K | 25 (0)| 00:00:01 | | |
    | 1 | NESTED LOOPS | | 4808 | 1596K| 25 (0)| 00:00:01 | | |
    | 2 | REMOTE | IMO_VW_LOTE_FISCAL | 25553 | 648K | 25 (0)| 00:00:01 | POAGEO | R->S |
    |* 3 | TABLE ACCESS BY INDEX ROWID| LOTE_FISCAL | 1 | 314 | 25 (0)| 00:00:01 | | |
    |* 4 | DOMAIN INDEX | XSPLOTE_FISCAL_GEO | | | 0 (0)| 00:00:01 | | |
    uery Block Name / Object Alias (identified by operation id):
    1 - SEL$F5BB74E1
    2 - SEL$F5BB74E1 / VLF@SEL$2
    3 - SEL$F5BB74E1 / LF@SEL$2
    4 - SEL$F5BB74E1 / LF@SEL$2
    Predicate Information (identified by operation id):
    3 - filter("VLF"."NUM_LOTE"="RETORNA_NUM_LOTE"("LF"."NUMBLOCO") AND
    "VLF"."NUM_SEQ_LOTE"="RETORNA_NUM_SEQ_LOTE"("LF"."NUMBLOCO"))
    4 - access("MDSYS"."SDO_RELATE"("LF"."GEOM","MDSYS"."SDO_GEOMETRY"(2003,1010101,NULL,"SDO_ELEM_INFO_ARRA
    Y"(1,1003,1),"SDO_ORDINATE_ARRAY"(180514.7833451195,1663508.6932339652,180514.84948680276,1663504.063316136
    6,180517.6274375,1663503.9971744534,180517.69357918325,1663508.4948089155,180514.7833451195,1663508.6932339
    652)),'mask=ANYINTERACT')='TRUE')
    *2- Using SQL Profile*
    Plan hash value: 3617866586
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | 4808 | 1596K| 485 (1) | 00:00:06 | | |
    |* 1 | HASH JOIN | | 4808 | 1596K| 485 (1) | 00:00:06 | | |
    | 2 | TABLE ACCESS BY INDEX ROWID| LOTE_FISCAL | 1882 | 577K| 459 (1) | 00:00:06 | | |
    |* 3 | DOMAIN INDEX | XSPLOTE_FISCAL_GEO | | | 0 (0) | 00:00:01 | | |
    | 4 | REMOTE | IMO_VW_LOTE_FISCAL | 25553 | 648K| 25 (0) | 00:00:01 | POAGEO | R->S |
    uery Block Name / Object Alias (identified by operation id):
    1 - SEL$F5BB74E1
    2 - SEL$F5BB74E1 / LF@SEL$2
    3 - SEL$F5BB74E1 / LF@SEL$2
    4 - SEL$F5BB74E1 / VLF@SEL$2
    Predicate Information (identified by operation id):
    1 - access("VLF"."NUM_LOTE"="RETORNA_NUM_LOTE"("LF"."NUMBLOCO") AND
    "VLF"."NUM_SEQ_LOTE"="RETORNA_NUM_SEQ_LOTE"("LF"."NUMBLOCO"))
    3 - access("MDSYS"."SDO_RELATE"("LF"."GEOM","MDSYS"."SDO_GEOMETRY"(2003,1010101,NULL,"SDO_ELEM_INFO_ARRA
    Y"(1,1003,1),"SDO_ORDINATE_ARRAY"(180514.7833451195,1663508.6932339652,180514.84948680276,1663504.063316136
    6,180517.6274375,1663503.9971744534,180517.69357918325,1663508.4948089155,180514.7833451195,1663508.6932339
    652)),'mask=ANYINTERACT')='TRUE')
    Recommendation (estimated benefit: 99.96%)
    - Consider this SQL Profile:.
    execute dbms_sqltune.accept_sql_profile(task_name => 'staName68255',
    task_owner => 'GEOPONTO', replace => TRUE);
    After the execution o the command above, the same query is executed in 3 seconds.
    P.S: I Cannot change the view, the column is indexed and SDO_FILTER will not work for me, because I need an exact match.
    Regards,
    Luis

  • Union two tables with diffrent count of fields with null and float value

    Hello,
    i want to union two tables, first one with 3 fields and second one with 4 fields (diffrent count of fields).
    I can add null value at end of first select but it does not work with float values in second table. Value form second table is convert to integer.
    For example:
    select null v1 from sessions
    union
    select 0.05 v1 from sessions
    result is set of null and 0 value.
    As workaround i can type:
    select null+0.0 v1 from sessions
    union
    select 0.05 v1 from sessions
    or simple change select's order.
    Is any better/proper way to do this? Can I somehow set float field type in first select?
    Best regards,
    Lukasz.
    WIN XP, MAXDB 7.6.03

    Hi Lukasz,
    in a UNION statement the first statement defines the structure (number, names and types of fields) of the resultset.
    Therefore you have to define a FLOAT field in the first SELECT statement in order to avoid conversion to VARCHAR.
    Be aware that NULL and 0.0 are not the same thus NULL+0.0 does not equal NULL.
    In fact NULL cannot equal to any number or character value at all.
    BTW: you may want to use UNION ALL to avoid the search and removal of duplicates - looks like your datasets won't contain duplicates anyhow...
    Regards,
    Lars

  • How to make screen field enable when table control gives an error

    Hi,
        I had a scneario like when table control data wrong then one parameter of the screen should be enabled for the input, i knew that screen-name will not work since it will have always table control fields only when table control gives an error.
    How to make the other parameter enable when table control throws an error.
    Regards,
    Jaya

    Hi Gobi,
         Thanks for your response, but issue is - how to make other screen fields enable when there was an error in the table control data.
    For table control - lets say we will use the code as i mentioned above.i am sure that we cant write the code for field enable in between loop & endloop.
    as you said if we right outside the loop-endloop, the module wont be triggered when table control throws an error, because that statement was not there in the loop-endloop.
    please let me know if you need any more information on the issue. I hope there is alternative for this in SAP.
    Thanks
    Jaya

  • Which table will give vendor master details per company code per purchase o

    Which table will give vendor master details per company code per purchase organisation that is all details available in XK03?

    hi
    Check T code MKVZ
    Or table LFA1
    Vishal...

  • How do i count number of table being used in a view

    Hi All,
    I will be really thankful if anyone please let me know about the count of number of tables being used in a view. I am using Oracle 10g Release 2 on HP-UX(11.31).
    In actual I have to find views in my database with more than 5 table in join.
    Thank you
    Gursimran

    Try :
    select count(*) from dba_dependencies
    where name ='<view name>'
    and owner = '<view owner>'
    and referenced_type= 'TABLE';Example:
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g 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
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> show user;
    USER is "HR"
    SQL>
    SQL> drop table t1 purge;
    Table dropped.
    SQL> drop table t2 purge;
    Table dropped.
    SQL> drop table t3 purge;
    Table dropped.
    SQL> drop view v;
    View dropped.
    SQL>
    SQL> create table t1(x int);
    Table created.
    SQL> create table t2(y int);
    Table created.
    SQL> create table t3(z int);
    Table created.
    SQL> create view v as select x,y,z from t1,t2,t3;
    View created.
    SQL>
    SQL> connect / as sysdba
    ConnectÚ.
    SQL> alter session set nls_language=english;
    Session altered.
    SQL>
    SQL> select count(*) from dba_dependencies
      2  where name ='V'
      3  and owner = 'HR'
      4  and referenced_type= 'TABLE';
      COUNT(*)
             3
    SQL>Edited by: P. Forstmann on 26 juil. 2010 17:45

Maybe you are looking for