Regarding  Complex View

I have a complex view in which all not null columns selected in view query for the both table,
No group function,pseudo column,distinct,group by clause,no columns defeined by expression,
Whether we can do DML operation for this above criteia?

From the document
Updates of Object Views
You can update, insert, and delete the data in an object view using the same SQL DML you use for object tables. Oracle updates the base tables of the object view if there is no ambiguity.
A view is not updatable if its view query contains joins, set operators, aggregate functions, GROUP BY, or DISTINCT. If a view query contains pseudocolumns or expressions, the corresponding view columns are not updatable. Object views often involve joins.
To overcome these obstacles Oracle provides INSTEAD OF triggers. They are called INSTEAD OF triggers because Oracle runs the trigger body instead of the actual DML statement.
INSTEAD OF triggers provide a transparent way to update object views or relational views. You write the same SQL DML (INSERT, DELETE, and UPDATE) statements as for an object table. Oracle invokes the appropriate trigger instead of the SQL statement, and the actions specified in the trigger body take place.

Similar Messages

  • How to update or delete records in a Complex View in Forms?

    Hi,
    I have a requirement to create a Form by using Complex View. Insertion is possible but updation and deletion is not working properly . I got FRM-40501 Error. I need How to update or delete records in a Complex View in Forms?
    Thanks & Regards,
    Hari Babu

    Depending on how complex your view is, forms is not able to determine how to appropiately lock a record, when you try to update or delete a record.
    One approach to using complex views in forms:
    1. Set the Key-mode of the block to "Non-Updateable"
    2. Mark the column which can be used to build the WHERE-condition to uniquely identify a record with "Primary Key" = "Yes"
    3. For doing INSERT, UPDATE and DELETE, create an INSTEAD-OF-trigger on the view.
    4. Create your own ON-LOCK-trigger in forms which does the locking of the records to update.

  • Complex view update

    Dear All
    Pls guide me how to update a complex View
    Thanks for reading this post
    *009*

    Hi again,
    You probably need to write an [Instead-of-Trigger|http://download.oracle.com/docs/cd/B12037_01/server.101/b10759/statements_7004.htm#i2064426]
    Regards
    Peter

  • Updates to a complex view

    SQL Developer version 3.0.04 on XP Pro
    We are able to use the data grid to update the values of views that are inherently updatable, no problem.
    We have a complex view with an associated instead-of-update trigger. We are able to update this complex view using an UPDATE statement, no problem.
    We would like to be able to update the complex view using the data grid (just in case I am mixing up the terminology, by "data grid" I mean the interface you get when you select the view from the navigation pane and then click the "Data" tab), but the fields are read only.
    Is there a configuration option that we can use to enable this? Or, some sort of workaround? Or, are we simply not able to update complex views using the data grid?
    Thanks!
    -Tom

    i think u need to change ur application structurei don't think so. Create an INSTEAD-OF-trigger on your view and manage the splitting there. In forms, you wil have to set the property "Primary Key" for the pk-item's to "Yes" and eventually you have to create an ON-LOCK-trigger

  • Complex view in forms 6i

    i have create a complex view
    and i want to use this view in oracle form developer 6i
    when i try to insert a new record in the view i have this error message frm-40602
    in the database i have wire the instead of trigger
    so how can i use the form to insert anew record in this view

    not all columns can be updated by a view. Those columns, which are not allowed have to be set to "Query Only". try this property

  • Why we cannot perform DML operations against complex views directly.

    hi
    can any tell me why we cannot perform DML operations against complex views directly.

    Hi,
    It is not easy to perform DML operations on complex views which involve more than one table as said by vissu. The reason being you may not know which columns to be updated/inserted/deleted on the base tables of the views. If it is a simple view containing a single table it is as simple as performing actions on the table.
    For further details visit this
    http://www.orafaq.com/wiki/View
    cheers
    VT

  • Complex Views

    I'm trying to figure out how to build a complex view. Right now I have a textfield and button that are tied to a search function. I have a SearchController class that is tied to a SearchView.xib. The textfield and search button are for specific keyword searching
    I want to add a table view to this search view for canned searches by category. Should I create another controller just for this sub-part to the view or should I just implement the methods for a UITableViewController within the Search Controller?

    I understand that a UITableViewController is just a dummy interface. That's not exactly what I'm getting at...
    I do have my controllers separated into a SearchController and a ResultsController with different xib view files associated with each of them. What I'm struggling with is trying to add a UITableView to the search view which is owned by SearchController which is a UIViewController.
    It seems like it would be a bad idea to have two controllers, one referencing the larger part of a view and a subpart of that view being controlled by a second controller, so I'm trying to add a UITableView as a member variable of the SearchController and making the SearchController a UITableViewDelegate. I just want to make sure I'm approaching this problem with the best practices. Apple has provided some great examples about Table Views themselves, and other views, but there is no example out there that has multiple types of views in one given view.

  • Complex views can be updatable?

    I am having one complex view i need to update at run time for that view dipendent table. how can It possible

    from the free, online SQLmanual, the CREATE VIEW chapter, Notes on Creating Updatable Views
    An updatable view is one you can use to insert, update, or delete base table rows. You can create a view to be inherently updatable, or you can create an INSTEAD OF trigger on any view to make it updatable.
    To learn whether and in what ways the columns of an inherently updatable view can be modified, query the USER_UPDATABLE_COLUMNS data dictionary view. (The information displayed by this view is meaningful only for inherently updatable views.)
    If you want the view to be inherently updatable, it must not contain any of the following constructs:
    A set operator
    A DISTINCT operator
    An aggregate or analytic function
    A GROUP BY, ORDER BY, CONNECT BY, or START WITH clause
    A collection expression in a SELECT list
    A subquery in a SELECT list
    Joins (with some exceptions as described in the paragraphs that follow).
    In addition, if an inherently updatable view contains pseudocolumns or expressions, you cannot update base table rows with an UPDATE statement that refers to any of these pseudocolumns or expressions.
    If you want a join view to be updatable, all of the following conditions must be true:
    The DML statement must affect only one table underlying the join.
    For an INSERT statement, the view must not be created WITH CHECK OPTION, and all columns into which values are inserted must come from a key-preserved table. A key-preserved table in one for which every primary key or unique key value in the base table is also unique in the join view.
    For an UPDATE statement, all columns updated must be extracted from a key-preserved table. If the view was created WITH CHECK OPTION, join columns and columns taken from tables that are referenced more than once in the view must be shielded from UPDATE.
    For a DELETE statement, if the join results in more than one key-preserved table, then Oracle deletes from the first table named in the FROM clause, whether or not the view was created WITH CHECK OPTION.

  • How to insert new record or update existing record using a complex view?

    Currently I created this screen, there is no problems on display data, only on the update funtionality (it means insert / update / delete on the table for which the view is based on).
    I have a table and a complex view in order to display the information from the table in a tabellar form (i.e up to 70 record in same "record" in the form, one for each item)
    The view is like this
    select a.f1, a.f2, get_value(a.pk1,1) a1, get_value(a.pk1,2) a2, get_value(a.pk1,3) a3............
    from my_table a
    where a.proj_id = user
    and I want to permit the update of the field a1, a2, a3 in a multiposition canvas (tabellar).
    I created an INSTEAD-OF trigger.
    But it not work only in the form. I receive the error FRM-40654 when I try to change the existing value in the running form based on that view.
    The view is woking and updatable using sql-plus.
    If I query
    select * from ALL_UPDATABLE_COLUMNS where table_name = 'SPV_BOQ_BOM_POS_ACTIVITIES';
    in which 'SPV_BOQ_BOM_POS_ACTIVITIES' is the name of my view.
    The question is: why if the view is updatable using SQL*Plus, is not updatable using Oracle Form 10gR2 ?
    Someone could help me asap?
    Thanks

    I removed on the datablock three items that are not showed, one of this is the Sysdate of update on the table for which the view is based.
    I removed also the on-lock trigger and the update from the form is NOT working fine.
    But for now I can still mantaing the ON-LOCK trigger.
    Is not a priority to remove this trigger.
    I still have the problem when the field is null, it mean that in the table SP_BOQ_BOM_POS_ACTIVITIES the record not exist.
    I try now to explayn better.
    SPV_BOQ_BOM_POS_ACTIVITIES is the name of the view.
    SP_BOQ_BOM_POS_ACTIVITIES is the name of the table.
    This are the desc
    desc SPV_BOQ_BOM_POS_ACTIVITIES
    Describing SPV_BOQ_BOM_POS_ACTIVITIES....
    NAME Null? Type
    BOQ_HEADER_ID NOT NULL NUMBER(12,0)
    BB_ID NOT NULL NUMBER(12,0)
    BOQ_ID NOT NULL NUMBER(12,0)
    PROJ_ID NOT NULL VARCHAR2(10)
    ACT_GROUP_CODE VARCHAR2(30)
    TOTAL_QTY NUMBER
    ACT_CODE_1 VARCHAR2(4000)
    QTY_1 NUMBER
    ACT_CODE_2 VARCHAR2(4000)
    QTY_2 NUMBER
    ACT_CODE_3 VARCHAR2(4000)
    QTY_3 NUMBER
    ACT_CODE_4 VARCHAR2(4000)
    QTY_4 NUMBER
    ACT_CODE_5 VARCHAR2(4000)
    QTY_5 NUMBER
    ACT_CODE_6 VARCHAR2(4000)
    QTY_6 NUMBER
    USR_ID NOT NULL VARCHAR2(10)
    LMOD NOT NULL DATE
    INT_REV NOT NULL NUMBER(6,0)
    The field QTY_1, QTY_2.... QTY_6 are calculated with a customer stored function from the table SP_BOQ_BOM_POS_ACTIVITIES.
    Also the field ACT_CODE_1, ACT_CODE_2, .... ACT_CODE_6 are calculated with a customer stored function from the table SP_BOQ_BOM_POS_ACTIVITIES.
    desc SP_BOQ_BOM_POS_ACTIVITIES
    Describing SP_BOQ_BOM_POS_ACTIVITIES....
    NAME Null? Type
    BBPA_ID NOT NULL NUMBER(12,0)
    BOQ_HEADER_ID NOT NULL NUMBER(12,0)
    BB_ID NOT NULL NUMBER(12,0)
    BOQ_ID NOT NULL NUMBER(12,0)
    PROJ_ID NOT NULL VARCHAR2(10)
    ACT_GROUP_CODE NOT NULL VARCHAR2(30)
    ACT_CODE NOT NULL VARCHAR2(30)
    QTY NUMBER(12,0)
    FLG_MANUAL_CHANGE VARCHAR2(1)
    USR_ID NOT NULL VARCHAR2(10)
    LMOD NOT NULL DATE
    INT_REV NOT NULL NUMBER(6,0)
    If I use SQL Navigator this insert working fine
    insert into SPV_BOQ_BOM_POS_ACTIVITIES
    (BOQ_HEADER_ID, BB_ID, BOQ_ID, PROJ_ID, ACT_GROUP_CODE, ACT_CODE_1, QTY_1)
    values (5050, 5015, 30486, 'B39368', 'TEST', '0101010101010101', 1709)
    1 row(s) inserted
    Instead using the Screen, at runtime, I receive the message:
    FRM-40400 Transation Complete: 1 records applied and saved
    but nothing is saved in the table SP_BOQ_BOM_POS_ACTIVITIES, and the view SPV_BOQ_BOM_POS_ACTIVITIES contain the calculated QTY_1 for the 'key', with null value.
    Moreover If in the field QTY_1 (NUMBER) I put a character, instead a Number, just to see if the Screen attempts or not an UPDATE or AN INSERT, the message is FRM-40509: Oracle Error. UNABLE TO UPDATE RECORD. Why happen an Update and not an INSERT using the Screen?
    In effect, the trial using SQL navigator of the following statement
    insert into SPV_BOQ_BOM_POS_ACTIVITIES
    (BOQ_HEADER_ID, BB_ID, BOQ_ID, PROJ_ID, ACT_GROUP_CODE, ACT_CODE_1, QTY_1)
    values (5050, 5015, 30486, 'B39368', 'TEST', '0101010101010101', 'r');
    I got Invalid Number and it's ok as answer from the database.
    Edited by: fmariani on 30-apr-2009 1.51

  • Creating a complex view

    I Need to create a complex (at least for me !!)view can some body throw some ideas
    I have two tables
    TABLE-1
    NAME     SYSTEM          DT
    AAA     GRADE-A          DATE
    AAA     GRADE-B          DATE
    BBB     GRADE-A          DATE
    BBB     GRADE-B          DATE
    CCC     GRADE-B          DATE
    TABLE-2
    NAME     SYSTEM          DT
    DDD     GRADE-C          DATE
    AAA     GRADE-C          DATE
    BBB     GRADE-C          DATE
    CCC     GRADE-C          DATE
    Now I need to create a view with following details.
    PV_MYVIEW
    CLASS          DT
    CLASS-A          DATE-A
    CLASS-B          DATE-B
    Where as date DATE-A should be oldest date (least) from following
    Table-1.date where name=AAA And SYSTEM=GRADE-A
    Table-1.date where name=AAA And     SYSTEM=     GRADE-B
    Table-1.date where name=BBB And     SYSTEM=     GRADE-A
    Table-1.date where name=BBB And     SYSTEM=     GRADE-B
    Table-1.date where name=CCC And     SYSTEM=     GRADE-B
    Table-2.date where name=DDD And     SYSTEM=     GRADE-C
    Table-2.date where name=AAA And     SYSTEM=     GRADE-C
    Table-2.date where name=BBB And     SYSTEM=     GRADE-C
    Table-2.date where name=CCC And     SYSTEM=     GRADE-C
    Where as DATE-B should be oldest date (least) from following
    Table-1.date where name=AAA And     SYSTEM=     GRADE-A
    Table-1.date where name=AAA And     SYSTEM=     GRADE-B
    Table-1.date where name=BBB And     SYSTEM=     GRADE-A
    Table-1.date where name=BBB And     SYSTEM=     GRADE-B
    Table-2.date where name=AAA And     SYSTEM=     GRADE-C
    Table-2.date where name=BBB And     SYSTEM=     GRADE-C
    As a solution for this, I Am thinking of first creating a intermediate view which comsist
    Class, Name and Date and then from this view creating PV_MYVIEW..
    Am i in right direction?
    THanks in advnce for your time

    creating an intermediate view is the worst thing to do!
    try this
    select
    'CLASS-A' class, min(dt) DT
    from
    select DT from TABLE1
    where (name='AAA' And SYSTEM='GRADE-A')
    or (name='AAA' And SYSTEM='GRADE-B')
    or (name='BBB' And SYSTEM='GRADE-A')
    or (name='BBB' And SYSTEM='GRADE-B')
    or (name='CCC' And SYSTEM='GRADE-B')
    union all
    select DT from TABLE2
    where (name='AAA' And SYSTEM='GRADE-C')
    or (name='BBB' And SYSTEM='GRADE-C')
    or (name='CCC' And SYSTEM='GRADE-C')
    or (name='DDD' And SYSTEM='GRADE-C')
    union all
    select
    'CLASS-B', min(dt)
    from
    select DT from TABLE1
    where (name='AAA' And SYSTEM='GRADE-A')
    or (name='AAA' And SYSTEM='GRADE-B')
    or (name='BBB' And SYSTEM='GRADE-A')
    or (name='BBB' And SYSTEM='GRADE-B')
    union all
    select DT from TABLE2
    where (name='AAA' And SYSTEM='GRADE-C')
    or (name='BBB' And SYSTEM='GRADE-C')
    You can for sure remove some duplicate clause and you should verify that the specifications are accurate
    REgards
    Laurent

  • Regarding selection view in ldb KDF

    Hello All,
    In logical db KDF when i go to selection view i can see three function groups ie vendor master companycode and documents with their respective ids.
    But when i execute report related with this logical database like tcode f.42 adn fbl1n i can see only two options in dynamic selections ie vendor master and company code where as documents option is missing
    How can i get documents options back in the report or is there any program to regenerate these dynamic selections
    Thanks
    SUnny

    Hi Suny,
    When I run the T-code FBL1N at my place and click on Dynamic selections button,what I see that there are all the three options--Vendor Master,Company Code and Documents available.
    You need to observe that against Vendor number there is no input box available but all the fields available under it till Company Code belong to Vendor Master.Similarly,all the fields mentioned under Comaony Code belong to Company Code and likewise all the fields mentioned under Documents like Special G/L Indicator,Assignment,Document number etc. belong to Document.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • Regarding program view

    Hi All,
    i want to know the users name who are all opened(saw) the program.
       could u help me plz.

    Hi Nareshreddy,
    You cannot know who has viewed a program. However, you can know who has changed the program through SAP version management (Utilities -> Versions -> Version Management).
    Hope this helps!
    Regards,
    Saurabh

  • Regarding Selection views in LDB

    Hi Experts,
    What is use of Selection Views in LDB ??
    and how can we generate different Selection Views in LDB because i am getting only two Options either SAP or CUS for every LDB ??
    I want to declare 4-5 and how to use Those Selection Views ( as by default it takes SAP one or newly generated one)
    Thanks,
    Regards,
    Anil Sonesar

    Hi Suny,
    When I run the T-code FBL1N at my place and click on Dynamic selections button,what I see that there are all the three options--Vendor Master,Company Code and Documents available.
    You need to observe that against Vendor number there is no input box available but all the fields available under it till Company Code belong to Vendor Master.Similarly,all the fields mentioned under Comaony Code belong to Company Code and likewise all the fields mentioned under Documents like Special G/L Indicator,Assignment,Document number etc. belong to Document.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • Regarding Narrative View

    Hi All,
    We are unable to see the check box "Contains HTML Markup" in Narrative View.
    Can anyone tell why it is not showing up?
    Thanks and Regards,
    -Vency

    No Ally.. In 'Static Text' view also it is not there... Also, checked it in HTML Text Dashboard page properties component, here also that option is not present.
    -Vency

  • Need help regarding complex calculation using Max value and limiting data after Max date in MDX

    I am working on a bit complex calculated measure in SSAS cube script mode.
    Scenario /Data Set
    Date
    A
    B
    C
    A+B
    5/29/2014
    Null
    34
    Null
    34
    6/30/2014
    Null
    23
    45
    68
    7/15/2014
    25
    -25
    Null
    0
    8/20/2014
    -34
    Null
    Null
    -34
    9/30/2014
    25
    Null
    60
    25
    10/15/2014
    45
    -45
    Null
    0
    11/20/2014
    7
    8
    Null
    15
    a) Need to capture latest non-null value of Column C based on date
    with above example it should be 60 as of 9/30/2014
    b) Need to capture column A+B for all dates.
    c) Add values from column (A+B) only after latest date which is after 9/30/2014. 
    with above example it's last 2 rows and sum is 15
    d) Finally add value from step a and step c. which means the calc measure value should be = 75
    I need to perform all this logic in MDX. I was able to successfully get step a and b in separate calc measure, however i am not sure how to limit the scope based on certain date criteria. In this case it's, date> Max date(9/30/2014) . Also how should
    i add calculated members and regular members?
    I was able to get max value of C based on date and max date to limit the scope.
    CREATE MEMBER CURRENTCUBE.[Measures].[LatestC] AS
    TAIL( 
      NONEMPTY(
        [Date].[Date].CHILDREN*[Measures].[C]),1).ITEM(0) ,visible=1;
    CREATE MEMBER CURRENTCUBE.[Measures].[MaxDateofC] AS
    TAIL( 
      NONEMPTY(
        [Date].[Date].CHILDREN,[Measures].[C]),1).ITEM(0).MemberValue ,visible=1;
    Please help with Scope statement to limit the aggregation of A+B for dates > MaxDateofC? Also further how to add this aggregation value to LatestC calc measure?
    Thank You

    Hi Peddi,
    I gave TRUNC to both of the dates. But still the same issue. I think the problem is in returning the BolbDomain.
    return blobDomain;
    } catch (XDOException xdoe) {
    System.out.println("Exception in XDO :");
    throw new OAException("Exception in XDO : "+xdoe.getMessage());
    catch (SQLException sqle) {
    System.out.println("Exception in SQL :");
    throw new OAException("SQL Exception : "+sqle.getMessage());
    catch (OAException e) {
    System.out.println("Exception in OA :");
    throw new OAException("Unexpected Error :: " +e.getMessage());
    Thanks and Regards,
    Myvizhi

Maybe you are looking for

  • Error message when trying to download 10.6 on to my Windows XP

    The error message reads : 'The feature you are trying to use is on a network resource that is unavailable. Click ok to try again, or enter an alternative path to a folder containing the installation package 'itunes.msi' in the box below.' I am not co

  • Infix vs Touch Up Tool

    Just an FYI, for any of you who are struggling with the Text Touch Up Tool when the text is oddly linked between different blocks, give Infix a try.  Infix is an excellent PDF editor that my company uses at times for pdf reporting needs.  Monthly, it

  • Invalid Payload Headers enqueuing on WF_BPEL_Q AQ queue

    Hello, I've created a BPEL process to post messages to the WF_BPEL_Q AQ queue on EBS R12. This is the payloadHeader I'm passing on the jca.aq.HeaderDocument property of the Invoke AQ Adapter activity from my BPEL process: <Header><PayloadHeader><MSG_

  • Looking for Captivate Developer in NYC.

    Please drop me a note if interested. Need someone to handle technical side of development. Work can be done remotely. Please be able to provide samples of your work. Thanks.

  • Why won't my Camera Attach with IMovie HD

    Hello, I have been trying to attach a mini dv through my Camcorders with firewire and they have not been seen in IMovie. I have two cameras, both of which are IMovie HD compatiable and I have gotten each to work on my powerbook g4 before without any