Instead of trigger on view with CLOB data

I have writed Instead of trigger for view "article(id,text)" with CLOB
field "text".
create or replace trigger v_article_insert
instead of insert on v_article
for each row
declare
begin
insert into article(id,text) values(id,:new.text);
end v_article_insert;
When I try to do DML (insert, update), forexample:
insert into v_article(text) values('bla-bla')
I get:
ORA-25008 no implicit conversion to LOB datatype in instead-of trigger.
( Cause: When inserting or updating a view using instead-of trigger, the
new value for a LOB view column is of a different datatype.
Action: Specified a LOB value as the new value for the LOB view
column.)
insert into v_article(text) values(empty_clob()) - It works...
What does it mean and what is right syntax for DML for CLOB fields in
instead of triggers?

When inserting CLOBs you create the row with an Empty_Clob() to initialize the CLOB field. Then you can update the empty CLOB with your CLOB value.
The error message is telling you that Oracle will not convert your CLOB to the initialization value needed.

Similar Messages

  • Refresh fails on materialized view with CLOB data type

    Hi,
    Hope somebody can help me with this issue.
    Some materialized views get status broken on refreshment, but only sometime. When I try to refresh them manually I get following message: "ORA-01400: cannot insert NULL into...". But I know for sure that there are no NULL values in the master table, MV and master tables are declared in the same way and all columns in master tables are NOT NULL columns. Another ting is that this error I get only on columns with data type CLOB.
    Please, help!
    /Julia

    hi,
    I cant upgrade to 11g.Also i cant change the table structure.
    Here is a sample of xmltype field content:
    RECID      XMLRECORD
    D00009999      <row id='D100009999'><c2>10000</c2><c3>xxxxx</c3><c5>xxxx..
    And i need to extract in the mv the data from c2, c3 and so on.
    Still waiting for a hint.
    Thank you.

  • INSTEAD OF trigger on view to update a table. error in 4.2apex tabular rpt

    I have created a view (LANDINGS_VIEW') that I am hoping to use to add/modify data over several tables. I am using INSTEAD OF trigger to update/insert into the underlying tables. I am receiving the error:
    •ORA-01858: a non-numeric character was found where a numeric was expected ORA-06512: at "SAFIS.LANDINGS_V_IO_UPD_TRG", line 4 ORA-04088: error during execution of trigger 'SAFIS.LANDINGS_V_IO_UPD_TRG' (Row 1)I am only setting PRICE = 300.
    any thoughts? Am I setting this up propertly? thanks for your help!!
    Karen
    The LANDING_VIEW is set up as follows:
    -- Start of DDL Script for View SAFIS.LANDINGS_VIEW
    -- Generated 03-May-2013 10:25:38 from [email protected]
    CREATE OR REPLACE VIEW landings_view (
       landing_seq,
       dealer_rpt_id,
       unit_measure,
       reported_quantity,
       landed_pounds,
       dollars,
       disposition_code,
       grade_code,
       species_itis,
       market_code,
       price,
       area_fished,
       sub_area_fished,
       lease_num,
       gear_code,
       de,
       ue,
       dc,
       uc,
       local_area_code,
       fins_attached,
       explanation,
       late_report,
       modified_data,
       nature_of_sale,
       hms_area_code,
       sale_price,
       deleted )
    AS
    select l.LANDING_SEQ,
           l.DEALER_RPT_ID,
           l.UNIT_MEASURE,
           l.REPORTED_QUANTITY,
           l.LANDED_POUNDS,
           l.DOLLARS,
           l.DISPOSITION_CODE,
           l.GRADE_CODE,
           l.SPECIES_ITIS,
           l.MARKET_CODE,
           l.PRICE,
           l.AREA_FISHED,
           l.SUB_AREA_FISHED,
           l.LEASE_NUM,
           l.GEAR_CODE,
           l.DE,
           l.UE,
           l.DC,
           l.UC,
           l.LOCAL_AREA_CODE,
           a.fins_attached,
           a.explanation,
           a.late_report,
           a.modified_data,
           a.nature_of_sale,
           a.hms_area_code,
           a.sale_price,
           a.deleted
      from landings l,
           landings_hms a
      where  l.dealer_rpt_id = v('P110_DEALER_RPT_ID') and
            l.dealer_rpt_id = a.dealer_rpt_id(+) and
            l.landing_seq = a.landing_seq(+)
    -- Triggers for LANDINGS_VIEW
    CREATE OR REPLACE TRIGGER landings_v_io_upd_trg
    INSTEAD OF
      UPDATE
    ON landings_view
    REFERENCING NEW AS NEW OLD AS OLD
    DECLARE
       v_first_day   date;
       BEGIN
    update landings set landing_seq = :old.landing_seq,
                              dealer_rpt_id = :old.dealer_rpt_id,
                              unit_measure = :new.unit_measure,
                              reported_quantity = :new.reported_quantity,  
                            --  landed_pounds = :new.landed_pounds,
                              dollars = :new.dollars,
                              disposition_code= :new.disposition_code, 
                              grade_code = :new.grade_code,
                              species_itis =  :new.species_itis,
                               market_code = :new.market_code,
                              price =  :new.price,
                              area_fished = :new.area_fished,
                              sub_area_fished = :new.sub_area_fished,
                           --   lease_num = :new.lease_num,
                              gear_code = :new.gear_code,
                              de = :new.de,
                              ue = :new.ue,
                              dc = :new.ue,
                              uc = :new.uc,
                              local_area_code =  :new.local_area_code ;     
        /*  update landings_hms  set dealer_rpt_id = :old.dealer_rpt_id,
                                 landing_seq = :old.landing_seq,
                                 fins_attached = :new.fins_attached,
                                 explanation = :new.explanation,
                                 late_report = :new.late_report,
                                 modified_data = :new.modified_data,
                                 nature_of_sale = :new.nature_of_sale,
                                 hms_area_code = :new.hms_area_code,
                                 sale_price = :new.sale_price,
                                 de = sysdate,
                                 ue = :new.ue,
                                 dc = :new.dc,
                                 uc = :new.uc ;                         
    end;
    -- End of DDL Script for Trigger SAFIS.LANDINGS_KEH_V_IO_TRG
    CREATE OR REPLACE TRIGGER landings_v_io_trg
    INSTEAD OF
      INSERT
    ON landings_view
    REFERENCING NEW AS NEW OLD AS OLD
    DECLARE
       v_first_day   date;
       BEGIN
    insert into landings_keh (landing_seq,
                              dealer_rpt_id,
                              unit_measure,
                              reported_quantity,
                              landed_pounds,
                              dollars,
                              disposition_code,
                              grade_code,
                              species_itis,
                              market_code,
                              price,
                              area_fished,
                              sub_area_fished,
                              lease_num,
                              gear_code,
                              de,
                              ue,
                              dc,
                              uc,
                              local_area_code)      
       values ( landings_seq.NEXTVAL,
                :new.dealer_rpt_id,
                :new.unit_measure,
                :new.reported_quantity,
                :new.landed_pounds,
                :new.dollars,
                :new.disposition_code,
                :new.grade_code,
                :new.species_itis,
                :new.market_code,
                :new.price,
                :new.area_fished,
                :new.sub_area_fished,
                :new.lease_num,
                :new.gear_code,
                sysdate,
                :new.ue,
                :new.dc,
                :new.uc,
                :new.local_area_code)  ;
       insert into landings_hms (dealer_rpt_id,
                                 landing_seq,
                                 fins_attached,
                                 explanation,
                                 late_report,
                                 modified_data,
                                 nature_of_sale,
                                 hms_area_code,
                                 sale_price,
                                 de,
                                 ue,
                                 dc,
                                 uc,
                                 deleted)
           values (:new.dealer_rpt_id,
                   landings_seq.CURRVAL,
                   :new.fins_attached,
                   :new.explanation,
                   :new.late_report,
                   :new.modified_data,
                   :new.nature_of_sale,
                   :new.hms_area_code,
                   :new.sale_price,
                   sysdate,
                   :new.ue,
                   :new.dc,
                   :new.uc,
                   :new.deleted);
    end;
    -- End of DDL Script for Trigger SAFIS.LANDINGS_KEH_V_IO_TRG
    -- End of DDL Script for View SAFIS.LANDINGS_VIEWbtw, I have succefully run the following update in sqlplus.
    update landings set landing_seq = 8604583,
    dealer_rpt_id = 2660038,
    unit_measure = 'LB',
    reported_quantity = 3,
    -- landed_pounds = :new.landed_pounds,
    dollars = 900,
    disposition_code= '001',
    grade_code = '10',
    species_itis = '160200',
    market_code = 'UN',
    price = 30,
    area_fished = null,
    sub_area_fished =null,
    -- lease_num = :new.lease_num,
    gear_code = '050',
    de = sysdate,
    ue = 'keh',
    dc = null,
    uc = 'keh',
    local_area_code = null
    where landing_seq = 8604583; I am using apex 4.2
    Edited by: KarenH on May 3, 2013 10:29 AM
    Edited by: KarenH on May 3, 2013 10:31 AM
    Edited by: KarenH on May 3, 2013 11:04 AM
    Edited by: KarenH on May 3, 2013 4:09 PM

    could it be so simple?
    when I created the tabular form on my view, LANDINGS_VIEW, the APPLYmru was automatically generated, referencing the view name LANDINGS_VIEW. I modified that to indicate the table name (LANDINGS). I am not certain why that would work, but it seems to so far.
    this post was helpful: Re: instead of trigger on view
    I am now testing to make certain both the underlying tables can be updated, LANDINGS and LANDINGS_HMS

  • Need help with INSTEAD OF trigger on view

    Hi,
    I am trying to use INSTEAD OF on a view because I will be updating the calling table in my trigger, which will cause mutation. 
    I need to update attribute7 of another record based on the new attribute7 of the current record (record being updated in the form).  Below is my script.  My problem is it does not perform the update. 
    create or replace view xxont_oe_order_lines_vw as select * from oe_order_lines_all;
    CREATE OR REPLACE TRIGGER APPS.xxont_sync_ard
    instead of insert or update on xxont_oe_order_lines_vw
    referencing
    new as new
    old as old
    for each row
    begin
       update oe_order_lines_all
           set attribute7 = :new.attribute7
       where attribute18 = to_char(:new.header_id)
          and attribute17 = to_char(:new.line_id)
          and flow_status_code <> 'CANCELLED' ;      
      /*exception
      when others then
         null ;
      end ;*/        
    end ;

    Always make your code developer friendly. Do extensive code instrumentation. At lease you can do this.
    create or replace trigger apps.xxont_sync_ard
    instead of insert or update on xxont_oe_order_lines_vw
    referencing
    new as new
    old as old
    for each row
    declare
       zero_update exception;
    begin
       update oe_order_lines_all
          set attribute7 = :new.attribute7
        where attribute18 = to_char(:new.header_id)
          and attribute17 = to_char(:new.line_id)
          and flow_status_code <> 'CANCELLED' ;
       if sql%rowcount = 0 then
         raise zero_update;
       end if;
    exception
      when zero_update then
         raise_application_error
               -20001
             , 'OE_ORDER_LINES_ALL: 0 rows updated attribute18 = "'
               || attribute18
               || '" attribute17 = "'
               || to_char(:new.line_id)
               || '"'
    end ;
    This will help you raise error when the update does not update any row. This is just an example, make sure if this is what your requirement wants if you want to implement it. If you don't want to raise error then you can just log it in a log table or log file.

  • Instead of trigger on view error

    I've created a view, a form on that view and an INSTEAD OF update trigger on that view. When I press the update button in the form I get
    Error: An unexpected error occurred: ORA-22816: unsupported feature with RETURNING clause (WWV-16016)
    The error changes if I remove the trigger, but I need the trigger because the view is not updateable. I've recreated the problem with a simple view on the emp table.
    Here's the emp view and trigger.
    create or replace view vw_emp
    as select *
    from emp;
    create or replace trigger vw_emp_burow
    instead of update on vw_emp
    referencing new as new old as old
    for each row
    begin
    null;
    end;In the emp case, the update proceeds fine once I drop the trigger.
    Is this a bug or have I done something wrong? Has anyone else tried this?
    (Portal 3.0.6.6.5 on 8.1.7 on Solaris)
    Responses appreciated.

    I was on the beta program, and ran into this problem with the beta version, and the EA version. Oracle told me that because of the underlying architecture of Oracle Portal, this was not easy to fix, so it would not be fixed in any 3.0 release.
    I am hoping they fix it in the 3.1 release, though that will not be out until something like next August.
    This is really an annoying bug, because using INSTEAD OF triggers on views would be a great way to make views that work well with Oracle Portal, while keeping the database normalized!
    Ken Atkins
    Computer Resource Team (www.crtinc.com)
    Check out my Oracle Tip site at:
    http://www.arrowsent.com/oratip
    null

  • Instead of trigger on view

    I created a view to use in a tabular form and only need to update one column from one table of that view. How do I write the instead of trigger to accomplish this? The field that I am trying to update is a select list-yes/no column in the tabular form. Upon submit with the wizard MRU and the instead of trigger I wrote the update doesn't take effect.
    Without the trigger I get this error:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved tableHere's the view:
    CREATE OR REPLACE FORCE VIEW  "GET_USERNAME_VW" ("DOC_INFO_ID", "DOC_TITLE", "DOC_LINK", "ECRNO", "OWNER", "ISO_NUMBER", "STATUS_ID", "FILE_TYPE", "APPROVAL_REQ", "APPROVED", "JOB_DESC", "USER_NAME") AS
      select     "DOC_INFO"."DOC_INFO_ID" as "DOC_INFO_ID",
         "DOC_INFO"."DOC_TITLE" as "DOC_TITLE",
         "DOC_INFO"."DOC_LINK" as "DOC_LINK",
         "DOC_INFO"."ECRNO" as "ECRNO",
         "DOC_INFO"."OWNER" as "OWNER",
         "DOC_INFO"."ISO_NUMBER" as "ISO_NUMBER",
         "DOC_INFO"."STATUS_ID" as "STATUS_ID",
         "DOC_INFO"."FILE_TYPE" as "FILE_TYPE",
         "DOC_INFO"."APPROVAL_REQ" as "APPROVAL_REQ",
         "DOC_INFO"."APPROVED" as "APPROVED",
         "SH_JOB_DESCRIPTION"."JOB_DESC" as "JOB_DESC",
         "SH_EMPLOYEES"."USER_NAME" as "USER_NAME"
    from     "SH_EMPLOYEES" "SH_EMPLOYEES",
         "SH_JOB_DESCRIPTION" "SH_JOB_DESCRIPTION",
         "DOC_INFO" "DOC_INFO"
    where   "DOC_INFO"."OWNER"="SH_JOB_DESCRIPTION"."JOB_DESC"
    and     "SH_JOB_DESCRIPTION"."JOB_DESC_ID"="SH_EMPLOYEES"."JOB_DESC_ID"
    and "DOC_INFO"."STATUS_ID" IN (1,2)
    /Here's the trigger I created
    CREATE TRIGGER GET_APPROVAL
    INSTEAD OF UPDATE ON GET_USERNAME_VW
    REFERENCING NEW AS n                
    FOR EACH ROW
    BEGIN
    update doc_info set approval_req = :n.approval_req
    END;As always, TIA!
    Alexandra
    Edited by: userRRRYB on Jul 11, 2011 4:16 PM - ADDED VIEW

    Alexandra,
    You're going to get that error when creating a tabular form off of a complex view because of the validations APEX creates for you, not because of your trigger. Delete those validations and try again.
    Of course, you're going to want to add the where clause to your trigger, or you'll find that you're updating many more rows than you want...
    -David

  • Instead-of Trigger of View on a Remote Table Fails!!!

    Hi all,
    I'm trying to create an INSTEAD OF (UPDATE or INSERT) trigger on a view V1 in DATABASE DB1 (Linux 7.3 or 7.2, ORACLE 9.2.0.1.0 - Production).The view V1 is created on a remote table through a DBLINK.But I always get such error when I update the view V1 using statements such as "update v1 set oid=oid+1000" :
    ORA-03113 end-of-file on communication channel
    But I can execute those statements successfully in Oracle of version 9.0.1.0.0 .
    What I want to say is that if some special configs is needed to support instead-of trigger of a view on a remote table ?

    Hi all,
    I'm trying to create an INSTEAD OF (UPDATE or INSERT) trigger on a view V1 in DATABASE DB1 (Linux 7.3 or 7.2, ORACLE 9.2.0.1.0 - Production).The view V1 is created on a remote table through a DBLINK.But I always get such error when I update the view V1 using statements such as "update v1 set oid=oid+1000" :
    ORA-03113 end-of-file on communication channel
    But I can execute those statements successfully in Oracle of version 9.0.1.0.0 .
    What I want to say is that if some special configs is needed to support instead-of trigger of a view on a remote table ?

  • Creation of view with clob column in select and group by clause.

    Hi,
    We are trying to migrate a view from sql server2005 to oracle 10g. It has clob column which is used in group by clause. How can the same be achived in oracle 10g.
    Below is the sql statament used in creating view aling with its datatypes.
    CREATE OR REPLACE FORCE VIEW "TEST" ("CONTENT_ID", "TITLE", "KEYWORDS", "CONTENT", "ISPOPUP", "CREATED", "SEARCHSTARTDATE", "SEARCHENDDATE", "HITS", "TYPE", "CREATEDBY", "UPDATED", "ISDISPLAYED", "UPDATEDBY", "AVERAGERATING", "VOTES") AS
      SELECT content_ec.content_id,
              content_ec.title,
              content_ec.keywords,
              content_ec.content content ,
              content_ec.ispopup,
              content_ec.created,
              content_ec.searchstartdate,
              content_ec.searchenddate,
            COUNT(contenttracker_ec.contenttracker_id) hits,
              contenttypes_ec.type,
              users_ec_1.username createdby,
              Backup_Latest.created updated,
              Backup_Latest.isdisplayed,
              users_ec_1.username updatedby,
              guideratings.averagerating,
              guideratings.votes
         FROM users_ec users_ec_1
                JOIN Backup_Latest
                 ON users_ec_1.USER_ID = Backup_Latest.USER_ID
                RIGHT JOIN content_ec
                JOIN contenttypes_ec
                 ON content_ec.contenttype_id = contenttypes_ec.contenttype_id
                 ON Backup_Latest.content_id = content_ec.content_id
                LEFT JOIN guideratings
                 ON content_ec.content_id = guideratings.content_id
                LEFT JOIN contenttracker_ec
                 ON content_ec.content_id = contenttracker_ec.content_id
                LEFT JOIN users_ec users_ec_2
                 ON content_ec.user_id = users_ec_2.USER_ID
         GROUP BY content_ec.content_id,
         content_ec.title,
         content_ec.keywords,
         to_char(content_ec.content) ,
         content_ec.ispopup,
         content_ec.created,
         content_ec.searchstartdate,
         content_ec.searchenddate,
         contenttypes_ec.type,
         users_ec_1.username,
         Backup_Latest.created,
         Backup_Latest.isdisplayed,
         users_ec_1.username,
         guideratings.averagerating,
         guideratings.votes;
    Column Name      Data TYpe
    CONTENT_ID     NUMBER(10,0)
    TITLE          VARCHAR2(50)
    KEYWORDS     VARCHAR2(100)
    CONTENT          CLOB
    ISPOPUP          NUMBER(1,0)
    CREATED          TIMESTAMP(6)
    SEARCHSTARTDATE     TIMESTAMP(6)
    SEARCHENDDATE     TIMESTAMP(6)
    HITS          NUMBER
    TYPE          VARCHAR2(50)
    CREATEDBY     VARCHAR2(20)
    UPDATED          TIMESTAMP(6)
    ISDISPLAYED     NUMBER(1,0)
    UPDATEDBY     VARCHAR2(20)
    AVERAGERATING     NUMBER
    VOTES          NUMBERAny help realyy appreciated.
    Thanks in advance
    Edited by: user512743 on Dec 10, 2008 10:46 PM

    Hello,
    Specifically, this should be asked in the
    ASP.Net MVC forum on forums.asp.net.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • BW Modeling Tools - open ods view with no data in BW

    Hi,
    We've created an Open ODS View in HANA Studio on HANA Model. HANA model has data in HANA Studio and BI reports on it, but when we look at the Open ODS View in BW, we don't see any data. We followed all prerequisites in installation guide and assigned authorizations to developers: https://websmp102.sap-ag.de/~sapidb/011000358700001144122013E
    We have dual schema HANA approach with BW sitting on own Schema.
    Could the BW system user be missing authorization?
    Sonni

    There is a nice Blog about mapping DBMS Users in SAP NetWeaver AS ABAP 7.40
    Best Regards Roland

  • Oracle Materialized view with xmltype data type

    this the table having in db1 i need to create materialized view db2 for this table i have followed below steps..
    create table WORKSHEETMASTER
    METHODID NUMBER(10),
    WORKSHEETCODE VARCHAR2(50 BYTE) not null,
    WORKSHEET SYS.XMLTYPE);
    create materialized view log on db1.WORKSHEETMASTER;
    db2
    CREATE MATERIALIZED VIEW WORKSHEETMASTER
    REFRESH FAST ON DEMAND
    AS
    SELECT METHODID,
    WORKSHEETCODE,
    worksheet FROM db1.WORKSHEETMASTER@DBLINK;
    when i was create materialized view above script in db2 iam getting error
    ORA-22992:cannot use LOB locators selected from remote tables
    like this when remove the worksheet column created succesfully may know how achieve this problem
    my database version 11g iam searched some sceniour not full filled
    need for help
    thanks

    this the table having with in DB1
    create table WORKSHEETMASTER
    METHODID NUMBER(10),
    WORKSHEETCODE VARCHAR2(50 BYTE) not null,
    WORKSHEET SYS.XMLTYPE,
    WORKSHEETID NUMBER primary key,
    CREATEDDATE DATE,
    CREATEDBY VARCHAR2(50 BYTE),
    WORKSHEETNAME VARCHAR2(50 BYTE),
    UPDATEDDATE DATE,
    UPDATEDBY VARCHAR2(50 BYTE),
    NOOFROWS NUMBER(3),
    NOOFCOLUMNS NUMBER(3),
    WORKSHEETTYPE CHAR(1 BYTE),
    SUBSTRATEUSED VARCHAR2(50 BYTE),
    STATUS NUMBER(1),
    APPROVEDBY VARCHAR2(50 BYTE),
    APPROVED CHAR(1 BYTE) default 'N',
    APPROVALREMARKS VARCHAR2(100 BYTE),
    LNG_WORKSHEETNAME VARCHAR2(50)
    iam trying to create materailzed view in db2
    create materialized view WORKSHEETMASTER
    refresh fast on demand
    as
    SELECT METHODID,
    WORKSHEETCODE,
    WORKSHEETID,
    worksheet,
    CREATEDDATE,
    CREATEDBY,
    WORKSHEETNAME,
    UPDATEDDATE,
    UPDATEDBY,
    NOOFROWS,
    NOOFCOLUMNS ,
    WORKSHEETTYPE,
    SUBSTRATEUSED,
    STATUS,
    APPROVEDBY,
    APPROVED,
    APPROVALREMARKS,
    LNG_WORKSHEETNAME FROM db1.WORKSHEETMASTER@DBLINK; --remote database
    iam creating above scriprt in db2 getting error this my total script

  • Very strange bug when using a view with a date

    Hi,
    Just thought I'd point out this bug I'd found and see if anybody has had similar problems.
    I'm connecting to Oracle 9i from servlets using the thin client-side JDBC driver. In the Oracle schema I've got a few views to another schema set up. One of them looks like this:
    select
    blah
    blah
    from
    projects
    where
    project_start_date between '1-Apr-2000' and '31-Mar-2010'
    Nothing wrong with this, you'd think. And indeed, the view works fine and any valid queries on the view also work fine if they're performed from anywhere apart from my servlets. The servlets can perform queries on all my other views but they think that this particular view is completely empty.
    As soon as I change the view to:
    project_start_date > '1-Apr-2000'
    the servlets can see the data in the view.
    Hope all this made sense. Anybody else had any similar problems?
    Chris.

    Any time you want to do a date comparison, you really want to do an explicit to_date conversion rather than relying on Oracle to do it implicitly. I'll wager that if you change the view to
    SELECT <columnList>
      FROM projects
    WHERE project_start_date BETWEEN to_date('1-Apr-2000', 'DD-MON-YYYY') and to_date('31-Mar-2010', 'DD-MON-YYYY')that everything will work.
    Justin

  • Materialized view with xmltype data type

    Hello to all,
    I have a challenge with my 10g r2 database. I need to make a materialized view from a table in this format:
    Name Null? Type
    RECID NOT NULL VARCHAR2(200)
    XMLRECORD XMLTYPE
    ,my problem is that (as i read from docs) i cant make the view refreshable on commit and also i cant refresh the mv in fast mode ( i dont need to refresh mv complete - takes too long).
    Do you have a hint for this?
    Thank you in advance.
    Daniel

    hi,
    I cant upgrade to 11g.Also i cant change the table structure.
    Here is a sample of xmltype field content:
    RECID      XMLRECORD
    D00009999      <row id='D100009999'><c2>10000</c2><c3>xxxxx</c3><c5>xxxx..
    And i need to extract in the mv the data from c2, c3 and so on.
    Still waiting for a hint.
    Thank you.

  • Creating a View with "clipped" data

    Hi all,
    I'm wondering if someone might know if it's possible to have clipped data in a view without clipping the original data that the view is drawing from.
    The problem we have is that we have a full dataset that we need to keep in a complete state (as a table in Oracle). We want to be able to create a View that will display a subset of data from this table, however, some of the objects in the full dataset cross a boundary and for these objects, we want the View to only show the part of the object within that boundary.
    I know we can clip the original layer but we ideally need to keep that layer untouched and do the clipping on-the-fly in the View. Is this possible?
    Thanks for any help you can give,
    Cheers, Paul

    Do you want to:
    create view my_clip
    as
    select a.id,
    a.attribute,
    mdsys.sdo_intersection(a.geometry,b.geometry,0.005) as geometry
    from mycliparea b,
    mytable a
    where sdo_anyinteract(a.geometry,b.geometry) = 'TRUE'
    Now this will work but to get performance you will have to do one of two things:
    1. Create a function based index. See doco or other postings in this forum for examples
    of how to do this.
    2. Change the view from an ordinary view to a materialized view. And then create
    a normal spatial index on the computed shape. (I recommend the use of
    these as against ordinary views.)
    However, Bryan is right, the problem with SDO_INTERSECTION is that it can return:
    1. Polygons;
    2. Lines;
    3. Points;
    4. Compound objects containing one or more of the above.
    If you want polygons only, then you need to extract them.
    <selfpromtion>
    I have written a set of extraction functions that do this which are available for free.
    Contact me at "spatialdbadvisor at netspace dot net dot au" or "simon at spatialdbadvisor dot com"
    </selfpromotion>
    The correct view definition using one of my functions would be:
    create view my_clip
    as
    select a.id,
    a.attribute,
    geom.ExtractPolygon(
    mdsys.sdo_intersection(a.geometry,b.geometry,0.005))
    as geometry
    from mycliparea b,
    mytable a
    where sdo_anyinteract(a.geometry,b.geometry) = 'TRUE'
    regards
    S

  • Env: Weblogic 8.1.5 Getting empty return in test view with new data

    Hi, I am using Weblogic 8.1.5, Basically a run down of this issue is that my response in test view, is completely Empty when I add a new piece of data in the response current code example below:
      SuccessResponseType srtype = SuccessResponseType.Factory.newInstance();
                srtype.setFacDesig(inFacDesig);
                srtype.setFacType(inFacType);
                srtype.setFacTermA(inTermA);
                srtype.setFacTermZ(inTermZ);
                srtype.setNotes(NoteRtn);
                srtype.setE3Array(rtn);
                Response.setSuccessResponse(srtype);Basically when srtype.setNotes(NoteRtn); is added in test view NONE of the values get populated, but once I comment srtype.setNotes(NoteRtn); out all the other values get populated in the response. At this point I am just plugging dummy data for the value of NoteRtn just to figure out why its doing this. Here is some example output.
    This is a response when the new line is commented out : (Its a decent amount of stuff so I cut some out, but you get the idea)
    <ns:successResponse>
    <ns:FacDesig>20027</ns:FacDesig>
    <ns:FacType>T1F</ns:FacType>
    <ns:FacTermA>MMPHTNMAFD1</ns:FacTermA>
    <ns:FacTermZ>MMPHTNMA43T</ns:FacTermZ>
    <ns:E3info>
    <ns:E3FacDesig>7101</ns:E3FacDesig>
    <ns:E3FacType>E3</ns:E3FacType>
    </ns:E3info>
    </ns:successResponse>
    This is what I get when I add in srtype.setNotes(NoteRtn);
    <ns:successResponse>
    </ns:successResponse>
    its just completely empty. My experience with weblogic and webservices is limited as it is, I am basically looking for someone to point me in the right direction for getting this resolved. I did not code the app I am just enhancing to in essence just add 2 strings of data to the response. The .xsd file is properly set up with the new elements and the response in the .xsd is properly set up. I am just at a loss as to what can cause the whole response to go kaput, by adding one more response type.
    Anyway, Thanks in advance

    Hi, I am using Weblogic 8.1.5, Basically a run down of this issue is that my response in test view, is completely Empty when I add a new piece of data in the response current code example below:
      SuccessResponseType srtype = SuccessResponseType.Factory.newInstance();
                srtype.setFacDesig(inFacDesig);
                srtype.setFacType(inFacType);
                srtype.setFacTermA(inTermA);
                srtype.setFacTermZ(inTermZ);
                srtype.setNotes(NoteRtn);
                srtype.setE3Array(rtn);
                Response.setSuccessResponse(srtype);Basically when srtype.setNotes(NoteRtn); is added in test view NONE of the values get populated, but once I comment srtype.setNotes(NoteRtn); out all the other values get populated in the response. At this point I am just plugging dummy data for the value of NoteRtn just to figure out why its doing this. Here is some example output.
    This is a response when the new line is commented out : (Its a decent amount of stuff so I cut some out, but you get the idea)
    <ns:successResponse>
    <ns:FacDesig>20027</ns:FacDesig>
    <ns:FacType>T1F</ns:FacType>
    <ns:FacTermA>MMPHTNMAFD1</ns:FacTermA>
    <ns:FacTermZ>MMPHTNMA43T</ns:FacTermZ>
    <ns:E3info>
    <ns:E3FacDesig>7101</ns:E3FacDesig>
    <ns:E3FacType>E3</ns:E3FacType>
    </ns:E3info>
    </ns:successResponse>
    This is what I get when I add in srtype.setNotes(NoteRtn);
    <ns:successResponse>
    </ns:successResponse>
    its just completely empty. My experience with weblogic and webservices is limited as it is, I am basically looking for someone to point me in the right direction for getting this resolved. I did not code the app I am just enhancing to in essence just add 2 strings of data to the response. The .xsd file is properly set up with the new elements and the response in the .xsd is properly set up. I am just at a loss as to what can cause the whole response to go kaput, by adding one more response type.
    Anyway, Thanks in advance

  • How do you set up Paged View with Spry Data Sets

    Hope someone can help. I have constructed a Spry data set using a html table and want  to use the paged view javascript to limit the amount of rows displayed on one page at a time to 10 then forcing a new page. Have found the java script file in the spry 1.6 download and attached it to the spry assets folder and have followed the instructions found at the Adobe development center   http://labs.adobe.com/technologies/spry/articles/pager/index.html        with no luck. Have attached  files to show what I have done. If someone could look at this and point out my error or suggest a better way I would be grateful. I am not a code warrior so simple  instructions would be so helpful. Many thanks in advance.
    Here is the code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryPagedView .js"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.HTMLDataSet("table.html", "ds1", {sortOnLoad: "Name", sortOrderOnLoad: "ascending"});
    ds1.setColumnType("Phone", "number");
    var pv1 = new Spry.Data.PagedView( ds1 ,{pageSize: 10});
    //-->
    </script>
    </head>
    <body>
    <input type="button" value="First" onclick="pv1.firstPage();" />
    <input type="button" value="Prev" onclick="pv1.previousPage();" />
    <input type="button" value="Next" onclick="pv1.nextPage();" />
    <input type="button" value="Last" onclick="pv1.lastPage();" /
    <div class="MasterDetail">
      <div spry:region="ds1" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="ds1" spry:setrow="ds1" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{Name}</div>
      </div>
      <div spry:detailregion="ds1" class="DetailContainer">
         <div class="DetailColumn">{Name}</div>
        <div class="DetailColumn">{Product}</div>
        <div class="DetailColumn">{Contact}</div>
        <div class="DetailColumn">{Phone}</div>
      </div>
      <br style="clear:both" />
    </div>
    <input type="button" value="First" onclick="pv1.firstPage();" />
    <input type="button" value="Prev" onclick="pv1.previousPage();" />
    <input type="button" value="Next" onclick="pv1.nextPage();" />
    <input type="button" value="Last" onclick="pv1.lastPage();" /
    </body>
    </html>

    Your region needs to refer to the pageview, not the dataset.  Your paged view var is already looking at/pulling in the ds.
    I would change the following code:
    <div spry:detailregion="ds1" class="DetailContainer">
         <div class="DetailColumn">{Name}</div>
        <div class="DetailColumn">{Product}</div>
        <div class="DetailColumn">{Contact}</div>
        <div class="DetailColumn">{Phone}</div>
      </div>
    to read the following:
    <div spry:region="pv1">
    <table>
    <tr spry:repeat="pv1">
    <td>{Name}</td>
    <td>{Product}</td>
    <td>{Contact}</td>
    <td>{Phone}</td>
    </tr>
    </table>
    Regards,
    Michael

Maybe you are looking for

  • Webcam/incoming video not working with flash 11

    I use a chat room which uses adobe flash for webcams to video conference. I've used adobe flash for webcam purposes for years without an issue but all of a sudden my outgoing video/audio doesn't work and incoming audio/video is very choppy. My webcam

  • How can i use an antifilter with firefox?like ultrasurf?

    the default browser used with ultra is IE and I guess I need to get my firefix's proxy and enter it in ultra.Am I right and what do I have to do to gain my fox proxy?

  • GPS still active after turning it off

    The gps works good, few seconds to fix the location but when I turn it off the gps still runs in background eating the juice... The toggle is turned off but if I check the battery life I always see the gps alive! How to solve, except rebboting the ph

  • Closing a class that extends JPanel

    Hi, i have a class that extends JPanel(lets call it class A). In that class, if the user click the logout button, i want class A to close and display class B that extends JFrame. right now, i am able to call class B, but i cannot close class A. I use

  • Does the pre-defined rules provide by SAP in PC 10?

    Hi Everyone I have two question about Process Control 10. 1. Rules, sample controls and scripts provided by SAP in PC 2.5. Does the pre-defined rules provide by SAP in PC 10? 2. If it provide, how many? I've read a lot of information about PC 10(RKT,