Creating an Updateable View with Key Preservable Tables

Hello everyone,
I'm trying to create a view of two tables that I have in order to perform an instead of trigger on said view. The table structures for the tables I am using are as follows:
Project Tasks Table
TASK_ID  (Primary Key)
TASK_NAME
TASK_DUE_DATE
Task Assignments Table
ASSIGNMENT_ID (Primary Key)
TASK_ID (Foreign Key)
USER_ID
ASSET_ID
Given that, I'd like to create a view of a left outer join of the tables, so that every task is shown, regardless of whether or not it is assigned to someone. I've successfully created the view, which can be seen here:
select
P.TASK_ID,
P.TASK_DUE_DATE,
P.TASK_NAME,
TA.ASSET_ID,
TA.USER_ID
from PROJECT_TASKS P
     left outer join PROJECT_TASK_ASSIGNMENTS TA
    on P.PROJECT_TASKS.TASK_ID = TA.PROJECT_TASK_ASSIGNMENTS.TASK_ID;
I have also created a trigger on this view, to update both tables on an insert to the view. However, I cannot execute the trigger as when I check if the columns are user updateable, it shows NO for all of them. Is there any way I can create a view on these tables that allows for every column to be UPDATEABLE, INSERTABLE and DELETABLE?

Hi,
If you're writing an INSTEAD OF trigger, then it doesn't matter if anything in the view is updateable, insertable, deleteable or whatnotable.  Do all DML operations directly on the base tables.
If you have problems, then post a complete test script that the peope who want to help you can run to re-create the problem and test their ideas.  Include CREATE TABLE and INSERT statements for you base tabels, the CREATE VIEW statement (if not exactly what you already posted), your best attempt at a CREATE TRIGGER statement, and some code that tests it.  Explain what results you want from that test (that is, what the tables should contain after it finishes.)
Start small and take baby steps.  Start with a trigger that, say, only DELETEs.  When we get that working, then we can change iot to handle INSERTs.

Similar Messages

  • Cannot select ROWID from a join view without a key-preserved table at OCI c

    Hi All,
    Can anybody help me..?
    When i am creating the request in the presentation services ..
    for some of the columns i am getting the following error..by removing those those columns it's working fine..
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1445, message: ORA-01445: cannot select ROWID from a join view without a key-preserved table at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    Please suggest me a solution..
    Thanks in Advance...

    Looks like you have a view that contains the ROWID of another table. Does the view work first from sqlplus? See whether it returns any data. Its a ORA- specific error. So, the error is related to your view rather than BI EE. Also, how many columns are you trying to pull in your report?
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • ORA-01779: cannot modify a column which maps to a non key-preserved table

    define cusname='GEORGE';
    INSERT INTO (select s.prd_id, s.cus_id, s.qty_sold, s.price from sales s, customers c where s.cus_id=c.cus_id)
    VALUES (102,(select cus_id from customers where upper(c_name) like '%GEORGE%'),14,(select price from product where prd_id = 102)*14)
    I am getting the following error when I am trying to run the above query.
    SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    CUSTOMERS TABLE
    Name   
    Null   
    Type        
    CUS_ID 
    NOT NULL
    NUMBER      
    C_NAME         
    VARCHAR2(50)
    C_LIMIT         
    NUMBER      
    CITY           
    VARCHAR2(20)
    PRODUCT TABLE
    Name 
    Null   
    Type        
    PRD_ID
    NOT NULL
    NUMBER      
    PRICE         
    NUMBER      
    COST           
    NUMBER      
    SALES TABLE
    Name   
    Null   
    Type  
    PRD_ID 
    NOT NULL
    NUMBER
    CUS_ID 
    NOT NULL
    NUMBER
    QTY_SOLD         
    NUMBER
    PRICE             
    NUMBER

    Hi,
    As the error message sugggested, INSERT directly into the sales table.  You can get the values from a sub-query that joins whatever tables are needed, including sales itself.  MERGE might be simpler and more efficient than INSERT.
    I hope this answers your question.
    If not, post  a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    If you're asking about a DML statement, such as INSERT, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Problem in updating fa_additions SQL Error: ORA-01779: cannot modify a column which maps to a non key-preserved table

    Hi,
    After using sql loader to import informations in the table fa_mass_additions and after the functionnal uses a treatment to imputate this assets, it asks me to do an update on the table fa_additions to change the value of attribute1 but i get an error
    Error report:
    ORA-01779: cannot modify a column which maps to a non key-preserved table
    ORA-06512: at line 11
    01779. 00000 -  "cannot modify a column which maps to a non key-preserved table"
    *Cause:    An attempt was made to insert or update columns of a join view which
               map to a non-key-preserved table.
    *Action:   Modify the underlying base tables directly.
    please how can i do this update?

    Hi,
    The "fa_additions" is a view, not a table.
    You should update the base table "fa_additions_b".
    Regards,
    Bashar

  • One view with button an table ui

    Hi
    I have a view with button and table ui element...whenever i press the button i have defined an acrtion...
    and in the action method i am calling a component contrller method..( this method is created automatically by create->service call bapi)
    i have also defined context mapping between view and component controller contexrt.
    Still when i click the button..the table ui element does not show the records

    Hi Tarang,
    Do you mean to say that, on click of the button, service is called and the results of the service should be populated into the table?
    If yes, plesase check the following points.
    1.)Make sure if the method is called and check the results obtained.
    2.) Also make sure if you are binding the obtained data to the context.(and check the context 's data in debugging)
    3.) Check if you have defined mapping between component controller context and view context.
    This is all I can think of as of now..
    Thanks,
    Aditya.

  • How can i creat CRC 32 CHECK WITH THE lookup table as attached.

    how can i creat CRC 32 CHECK WITH THE lookup table.attached
    i creat one,but not match the result number C++ version
    result number C++ version:
    FE 00 18 02 40 1E 65 43 00 03 E8        CRC32=>78 1F E9 06
    FE 01 18 02 40 1E 65 43 00 03 E8        CRC32=>F8 8F 49 61
    FE 02 18 02 40 1E 65 43 00 03 E8        CRC32=>7D FF B4 7F

    due to some reason i can not attach the table.but you can find it herehttp://lavag.org/topic/15325-crc32/,it in the CRC.llb 84.03K =>CRC-32 Table.ctl thanks a lot

  • When selecting a row from a view with a nested table I want just ONE entry returned

    Does a nested table in a view "EXPLODE" all values ALWAYS no matter the where clause for the nested table?
    I want to select ONE row from a view that has columns defined as TYPE which are PL/SQL TABLES OF other tables.
    when I specify a WHERE clause for my query it gives me the column "EXPLODED" with the values that mathc my WHERE clause at the end of the select.
    I dont want the "EXPLODED" nested table to show just the entry that matches my WHERE clause. Here is some more info:
    My select statement:
    SQL> select * from si_a31_per_vw v, TABLE(v.current_allergies) a where a.alg_seq
    =75;
    AAAHQPAAMAAAAfxAAA N00000 771 223774444 20 GREGG
    CADILLAC 12-MAY-69 M R3
    NON DENOMINATIONAL N STAFF USMC N
    U
    E06 11-JUN-02 H N
    05-JAN-00 Y Y
    USS SPAWAR
    353535 USS SPAWAR
    SI_ADDRESS_TYPE(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NUL
    L, NULL)
    SI_ADDRESS_TAB()
    SI_ALLERGY_TAB(SI_ALLERGY_TYPE(69, 'PENICILLIN', '11-JUN-02', NULL), SI_ALLERGY
    TYPE(74, 'SHELLFISH', '12-JUN-02', NULL), SIALLERGY_TYPE(68, 'PEANUTS', '13-J
    UN-02', NULL), SI_ALLERGY_TYPE(75, 'STRAWBERRIES', '13-JUN-02', NULL))
    SI_ALLERGY_TAB()
    75 STRAWBERRIES 13-JUN-02
    *******Notice the allergy entry of 75, Strawberries, 13-JUN-02 at the
    end. This is what I want not all the other exploded data.
    SQL> desc si_a31_per_vw
    Name Null? Type
    ........ Omitted uneeded previous column desc because of metalink
    character limit but the view is bigger then this.......
    DEPT_NAME VARCHAR2(20)
    DIV_NAME VARCHAR2(20)
    ADDRESSES SI_ADDRESS_TAB
    CURRENT_ALLERGIES SI_ALLERGY_TAB
    DELETED_ALLERGIES SI_ALLERGY_TAB
    SQL> desc si_allergy_tab
    si_allergy_tab TABLE OF SI_ALLERGY_TYPE
    Name Null? Type
    ALG_SEQ NUMBER
    ALG_NAME VARCHAR2(50)
    START_DATE DATE
    STOP_DATE DATE
    SQL> desc si_allergy_type
    Name Null? Type
    ALG_SEQ NUMBER
    ALG_NAME VARCHAR2(50)
    START_DATE DATE
    STOP_DATE DATE

    Can you explain what do you mean by the following?
    "PL/SQL tables (a.k.a. Index-by tables) cannot be used as the basis for columns and/or attributes"There are three kinds of collections:
    (NTB) Nested Tables
    (VAR) Varrying Arrays
    (IBT) Index-by Tables (the collection formerly known as "PL/SQL tables")
    NTB (and VAR) can be defined as persistent user defined data types, and can be used in table DDL (columns) and other user defined type specifications (attributes).
    SQL> CREATE TYPE my_ntb AS TABLE OF INTEGER;
    SQL> CREATE TABLE my_table ( id INTEGER PRIMARY KEY, ints my_ntb );
    SQL> CREATE TYPE my_object AS OBJECT ( id INTEGER, ints my_ntb );
    /IBT are declared inside stored procedures only and have slightly different syntax from NTB. Only variables in stored procedures can be based on IBT declarations.
    CREATE PROCEDURE my_proc IS
       TYPE my_ibt IS TABLE OF INTEGER INDEX BY BINARY_INTEGER;  -- now you see why they are called Index-by Tables
       my_ibt_var my_ibt;
    BEGIN
       NULL;
    END;That sums up the significant differences as it relates to how they are declared and where they can be referenced.
    How are they the same?
    NTB and VAR can also be (non-persistently) declared in stored procedures like IBTs.
    Why would you then ever use IBTs?
    IBTs are significantly easier to work with, since you don't have to instantiate or extend them as you do with NTB and VAR, or
    Many other highly valuable PL/SQL programs make use of them, so you have to keep your code integrated/consistent.
    There's a lot more to be said, but I think this answers the question posed by Sri.
    Michael

  • How to create tabular form whithout primary key in table

    Hi All,
    I have requirement to create a tabular form but the problem is, the table which I am using in the application don't have any Primary key, I am using only one table can't change any thing in table.(i.e can't add any row in table,no change in data model)
    How can I create tabular form when primary key is not available.
    looking forward for all of your quick responce.
    Thanks in advance.
    Dikshit Kumar Nidhi

    You can create a view like
    select a.rowid id, a.*
    from table a
    and create a tabular form on this view. You can use
    the new column ID as Primary key.Did you try to actually do this? I did at
    http://htmldb.oracle.com/pls/otn/f?p=24317:159
    And when I change something and click Submit, I get an error
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-01733: virtual column not allowed here, update "VIKASA"."NO_PK_VW" set "ID" = :b1, "I" = :b2, "J" = :b3 where "ID" = :p_pk_col
    Thanks

  • How to create a triangle view with a select query?

    I need help to build a select query that will create a triangle view.
    Below is the table I have to query
    *{color:#ff0000}INITIAL TABLE{color}*
    *{color:#008000}AMOUNT | TRANSACTION_DATE | OPEN_DATE | TYPE{color}*
    5 | 30-JAN-09 | 10-JAN-09 | A
    10 | 12-JAN - 09 | 30-NOV-08 | A
    20 | 30 - DEC - 08 | 15-OCT-08 | A
    10 | 30 - DEC - 08 | 8 - OCT - 08 | A
    *{color:#ff0000}THE FINAL TABLE I HAVE TO CREATE:{color}*
    DEV_PERIOD - TO_CHAR(TRUNC(TRANSACTION_DATE,'Q'),'YYYY-Q') AS DEV_PERIOD
    OPEN PERIOD - TO_CHAR(TRUNC(OPEN_DATE,'Q'),'YYYY-Q') AS OPEN_PERIOD
    {color:#008000}*SUM of AMOUNT | DEV_PERIOD | OPEN_PERIOD | TYPE*{color}
    5 | 2009 - 1 | 2009 - 1 | A
    40 | 2009 - 1 | 2008 - 4 | A
    30 | 2008 - 4 | 2008 - 4 | A
    {color:#ff0000}*This is another view of the table (The triangle view)*{color}
    | Dev_Period 2008- 1 | 2008 - 2| 2008 -3 | 2008 - 4 | 2009 -1 |
    Open_Period |
    2008 - 1..................... 0.......... 0............ 0........... 0.......... 0
    2008 - 2 ..................................0............ 0........... 0.......... 0
    2008 - 3................................................. 0........... 0.......... 0
    2008 - 4 ..............................................................30......... 40
    2009 - 1 .............................................................................5
    Any ideas will be appreaciated.
    Thank you!

    I think the first thing you need to do is look up "pivot query" in this newsgroup. And how complicated your query gets to be will depend on your database version (11 natively supports pivot queries). You have a variable number of columns in your result set (depending on how many quarters you have in your data.
    I think once you get the columns sorted out, working out the numbers to put in each column will be relatively easy.
    Jon

  • Is it possible to create a spatial view with paramete?

    Is it possible to create a view with parameter like following:
    SELECT GEOM FROM INTERSTATES WHERE MDSYS.SDO_FILTER(GEOM, MDSYS.SDO_GEOMETRY(2003, 8307, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?, ?, ?, ?)), 'querytype=WINDOW') = 'TRUE'
    so that I can specify ???? at run time.
    If not, is there a way to create a view that perform variable window query?

    You may want to look at application contexts, that way you may have code something like this:
    create or replace context gis_ctx using gis_params ;
    create or replace package gis_params
    as
    procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number );
    end;
    create or replace package body gis_params
    as
    procedure set_bounds( minx in number, miny in number, maxx in number,maxy in number )
    is
    begin
    dbms_session.set_context( 'gis_ctx', 'minx', minx);
    dbms_session.set_context( 'gis_ctx', 'miny', miny);
    dbms_session.set_context( 'gis_ctx', 'maxx', maxx);
    dbms_session.set_context( 'gis_ctx', 'maxy', maxy);
    end ;
    end ;
    To use this method you´ll have to execute
    gis_params.set_bounds(-3,40,-2.9,40.1) ;
    before doing the select.
    SELECT GEOM
    FROM INTERSTATES
    WHERE MDSYS.SDO_FILTER(GEOM,
    MDSYS.SDO_GEOMETRY(2003,
    8307,
    NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(sys_context ('gis_ctx', 'minx'),
    sys_context ('gis_ctx', 'miny'),
    sys_context ('gis_ctx', 'maxx'),
    sys_context ('gis_ctx', 'maxy'))),
    'querytype=WINDOW') = 'TRUE' ;
    I f you are in a web environment, read about GLOBAL CONTEXT ACCESSED GLOBALLY .
    Regards, Nico.

  • Creating UDO through code  with 1 Docment table & 4 Document Line Tables

    Hi,
    I need to create one Document table and four Document Line tables(child tables) and make them UDO through code. This process is working When I am creating UDO with one Document table and one Document Line table but if I add more than one Child table it is taking only one child.... Can anyone give me some solution or code example related to this problem this problem?
    Regards,
    Sudeshna.

    Hi,
    Firstly Trinidad, unfortunately I could not open that link.
    And secondly, the following is my code... Through this code I am trying to create an UDO with one document table and two document line tables.... here the UDO is being created but it is not taking two line table, its taking only one Document line table.... how can I create udo with more than one Document line tables?
    Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
    oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
    oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.ChildTables.TableName = "childSplitNew1"
    oUserObjectMD.ChildTables.TableName = "childSplitNew2"
    oUserObjectMD.Code = "udoSplitNew"
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.Name = "udoSplitNew"
    oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
    oUserObjectMD.TableName = "masterSplitNew"
    lRetCode = oUserObjectMD.Add()
    Regards,
    Sudeshna.

  • What is the difference between READ TABLE ITAB WITH KEY  and  TABLE KEY

    Hi Experts,
    what is the difference between
    READ TABLE <ITAB> WITH KEY <K1> = <C1>
                                                    <Kn> = <Cn> .
    and 
    READ TABLE <ITAB> WITH TABLE KEY <K1> = <C1>
                                                              <Kn> = <Cn> .
    Thanks
    Akash.

    Hi akashdeep,
    Nice question. I also tried to find out, but no much success. My opinion is that for practical purposes there is no difference.
    It may have difference in case of searching, especially sorted tables. (binary search or normal linear search).
    Case1: If our table is sorted table with defined key fields, and we give WITH TABLE KEY, then faster binary search is used.
    Case2 : If our table is sorted table with defined key fields, and we give WITH  KEY, (and no field contained in the keys), then normal linear search is used.
    regards,
    amit m.

  • Can we create a Materialized View with Parameters?

    Experts,
    Can we create a materialized view by passing parameters to it. so that we change its value dynamically.
    If yes, plese provide me the eample also.
    Regards
    ND

    I have below mentioned query to be used in MV :
    SELECT ivr_vw.event_type, ivr_vw.event_sub_type,
    ivr_vw.channel_cd,
    ivr_vw.csg_event_id,
    ivr_vw.csg_title,
    ivr_vw.itv_title,
    ivr_vw.program_id,
    ivr_vw.price,
    ivr_vw.addt_flag,
    (SELECT FROM_TZ(TO_TIMESTAMP (TO_CHAR (to_date(ivr_vw.start_date,'MM/DD/YYYY HH24:MI:SS'), 'MM/DD/YYYY HH24:MI:SS'),
    'MM/DD/YYYY HH24:MI:SS' ), 'EST')
    AT TIME ZONE 'MST' FROM DUAL) start_date,
    (SELECT FROM_TZ(TO_TIMESTAMP (TO_CHAR (to_date(ivr_vw.end_date,'MM/DD/YYYY HH24:MI:SS'), 'MM/DD/YYYY HH24:MI:SS'),
    'MM/DD/YYYY HH24:MI:SS' ), 'EST')
    AT TIME ZONE 'MST' FROM DUAL) end_date,
    (SELECT FROM_TZ(TO_TIMESTAMP (TO_CHAR (to_date(ivr_vw.start_order_window,'MM/DD/YYYY HH24:MI:SS'), 'MM/DD/YYYY HH24:MI:SS'),
    'MM/DD/YYYY HH24:MI:SS' ), 'EST')
    AT TIME ZONE 'MST' FROM DUAL) start_order_window,
    (SELECT FROM_TZ(TO_TIMESTAMP (TO_CHAR (to_date(ivr_vw.end_order_window,'MM/DD/YYYY HH24:MI:SS'), 'MM/DD/YYYY HH24:MI:SS'),
    'MM/DD/YYYY HH24:MI:SS' ), 'EST')
    AT TIME ZONE 'MST' FROM DUAL) end_order_window,
    ivr_vw.dnis_cd, ivr_vw.packaged_event_id, ivr_vw.no_instalments,
    ivr_vw.disclaimer_flag, ivr_vw.english_voice_file_name,
    ivr_vw.spanish_voice_file_name, ivr_vw.package_flag,
    ivr_vw.is_all_day_event, ivr_vw.upsell_data, ivr_vw.dur_guaran_flag,
    ivr_vw.cp_profile_id, ivr_vw.high_def_flag
    FROM ppv_ivr_vw ivr_vw,
    (Select time_diff,
    use_daylight
    From ppv_zip_timezones ztz
    Where ztz.zip_code = 80014
    ) timeOffset
    WHERE NOT EXISTS (
    SELECT 'x'
    FROM ppv_channels_blackout_vw blk_vw
    WHERE ivr_vw.channel_cd = blk_vw.channel_cd
    AND blk_vw.zone_type_code = 'Area Code'
    AND blk_vw.zone_code = '435');
    Here, the column 'ztz.zip_code = 80014' should change dynamically as per the request of the user.
    Is it possible. If yes, what is the process of doing so.?
    Regards
    ND

  • Returning newly created IDs from View with Instead Of

    Hi All,
    I have the following table:
    CREATE TABLE TBLSIM_SUPPLIER_H
        "SS_ID" NUMBER(10,0) NOT NULL ENABLE,
        "SS_GUID" NVARCHAR2(36) NOT NULL ENABLE,
        "SS_NAME" NVARCHAR2(50) NOT NULL ENABLE,
        "SS_H_IS_ACTIVE" NUMBER(1,0) DEFAULT 1 NOT NULL ENABLE,
        "SS_H_RE_ID"     NUMBER(10,0) NOT NULL ENABLE,
        "SS_H_DATE" DATE DEFAULT SYSDATE NOT NULL ENABLE,
        "SS_H_MASTER_ID" NUMBER(10,0),
        CONSTRAINT "TBLSIM_SUPPLIER_PK" PRIMARY KEY ("SS_ID") ENABLE,
        CONSTRAINT "TBLSIM_SUPPLIER_FK_M_ID" FOREIGN KEY ("SS_H_MASTER_ID") REFERENCES "TBLSIM_SUPPLIER_H" ("SS_ID") ENABLE
      )on which is enabled this trigger
    CREATE OR REPLACE TRIGGER TBLSIM_SUPPLIER_H_TRG BEFORE
      INSERT ON TBLSIM_SUPPLIER_H FOR EACH ROW BEGIN <<COLUMN_SEQUENCES>> BEGIN IF :NEW.SS_ID IS NULL THEN
      SELECT TBLSIM_SUPPLIER_H_SEQ.NEXTVAL INTO :NEW.SS_ID FROM DUAL;
    END IF;
    IF :NEW.SS_GUID IS NULL THEN
      :NEW.SS_GUID  := UTILITYPKG.formatted_guid;
    END IF;
    END COLUMN_SEQUENCES;
    END;UTILITYPKG.formatted_guid returns a standard 36chr GUID
    I then created a view
    CREATE OR REPLACE FORCE VIEW TBLSIM_SUPPLIER
    AS
      SELECT SS_ID,
        SS_GUID,
        SS_NAME,
        SS_H_IS_ACTIVE,
        SS_H_RE_ID,
        SS_H_DATE
      FROM TBLSIM_SUPPLIER_H
      WHERE (ss_h_is_active = 1);on which I enabled the trigger
    CREATE OR REPLACE TRIGGER TBLSIM_SUPPLIER_INS INSTEAD OF
      INSERT ON TBLSIM_SUPPLIER FOR EACH ROW
        BEGIN
      INSERT INTO TBLSIM_SUPPLIER_H (ss_name, ss_h_is_active, ss_h_re_id, ss_h_date)
        VALUES (:NEW.ss_name, 1, :NEW.ss_h_re_id, SYSDATE);
    END TBLSIM_SUPPLIER_INS;I then have a stored Procedure
    PROCEDURE SimSupplier_Create(
          cur_tblresource_id_in IN tblresource.re_id%TYPE
        , ss_name_in IN tblsim_supplier.ss_name%TYPE
        , ss_id_out OUT tblsim_supplier.ss_id%TYPE
        , ss_guid_out OUT tblsim_supplier.ss_guid%TYPE
      ) AS
      BEGIN
        INSERT INTO tblsim_supplier (
          , ss_name
          , ss_h_re_id
        VALUES ( 
          , ss_name_in
          , cur_tblresource_id_in
       RETURNING ss_id, ss_guid INTO ss_id_out, ss_guid_out;
      END SimSupplier_Create; What happens is that the RETURNING clause is not available.
    Any way of getting the ID & GUID of the just inserted record out of the prcedure?
    Thanks
    Andrea

    Why do you need this instead of trigger? Can't you simply insert into the view? Maybe enable WITH CHECK OPTION to prevent wrong values beeing entered via the view. Or simply insert into the table and not the view. As long as it is done in the procedure, you are safe that there is no priviledge confict.
    Edited by: Sven W. on Oct 17, 2012 5:38 PM

  • BEx WAD - Creating a Web Template with Chart and Table

    Hi All. 
    I am creating a new Web Application. This contains a dropdown with 2 reports to select.
    When the user selece report from the dropdown list, it has to display both Table and Chart for the report.
    Could you pls explain me how can I do this.
    Thanks
    SR.

    Still the same way pretty much but you can view here:
    http://helpx.adobe.com/business-catalyst/using/add-blog.html
    You got all this: http://forums.adobe.com/community/business_catalyst/documents
    Which is on the overview page of these forums. And in there are links to 3rd party resources too.

Maybe you are looking for

  • Display variant in  ALV grid

    Hi , i have developed an interactive report in which form the first grid display i will move to the second grid display. Problem:              For the first list there is an display variant. when i navigate to the second list it is using the same dis

  • Issue with setting a default value to a Tabular Form field

    Hi - I'm running into an issue setting the default value of a tabular form column. I'm trying to set the default value to the row number (#rownum#). This used to work in previous versions, but now it's returning 0. Is there a was to set this value in

  • Windows Small Business Server User Roles - Missing or deleted

    I have a small business server sbs 2008 r2. The user roles, Standard, Administrator, Standard w/ admin are no longer available. I don't know why, or how. All I can guess is the previous IT admin, removed the roles, without permission. I am wondering

  • Itune 64-bit touble

    Hey so I tried to get music from my Itunes (on my computer) to my music on my Ipod touch. When I plug in my Ipod to sync it says "This Ipod cannot be used because the required software is not installed. Run the Itunes installer to remove Itunes, then

  • How do I turn off the Bluhell firewall. I need to turn off temporarily

    I need to turn off the bluhell firewall. I try to click on the icon but nothing happens.