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

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.

  • 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 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

  • 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

  • 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.

  • View-Update in forms with Instead-Of trigger

    I has created a view and an Instead-Of trigger on that view.
    Now, I want to update this view in FORMS 6. I am unable to update this view and getting error FRM-40602.
    Is there any way to update this view updatable in FORMS6 or FORMS6 has not this feature?

    Hi,
    This has been acknowledged by Oracle as bug earlier. The work-around for this is as follows:
    1. Create table 1
    2. Create table 2
    3. Create view
    4. Create instead of insert trigger on view
    5. Create instead of update trigger on view
    6. Now, in the forms, go to the Block property
    7. Look for the 'Key mode' property. By default it is 'Automatic'. Set it to Updateable (If your database design supports updating primary keys) or Unique (preferable).
    8. Now run the form. It should work.
    All the best.
    Sunil Kumar G S

  • Live View Updates Extremely Slow in DW 5.5

    I'm having a problem with the Live view update. I'm using the localhost as my testing server.  So, network speed shouldn't be an issue.  I'm on a Windows 64 bit, 2.2 gHz, Quad Core, 8 GB ram..so it should run relatively well.  But, I sometimes have to wait 2 minutes for the screen to update when I change something, turn off LiveView, then turn it back on.  You can imagine how this slows down development.  Every change takes 2 minutes to see?  Yikes!  It makes the product almost unusable. 
    Is there any fix for this?

    Last night, I got the solution to this from Adobe tech support -- at least for me.  The technician suggested that I update my video card driver.
    And also make sure that I had the latest version of Flash  player.  Apparently, CS5.5 has adopted a new way of previewing files that relys heavily on the video cache and the player, and old drivers are usually the problem. 
    I did this, and things work much better.  Still a bit doggy at times, but I can work with it.
    He also suggested that I upgrade to Windows 7.  (I'm still using Vista)  ANd that I would see a "100% improvement".  I like the sound of that.  Haven't tried it yet....If anybody does, let me know how it goes.
    :<)McFrisco

  • Content Viewer update is available!

    The Content Viewer update just landed on the App Store.

    Hurray !! How many emoticons are there to express joy ?
    And you can download it here or just let iTunes fetch it for you.
    And before this thread starts to look like a Justin Bieber fan page,
    I'll also note that I'm curious about the announced Builder update.
    Hopefully this pack of new tools, panels, and viewers will not just
    offer lots of new features, bu also solve many issues and errors.

  • 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.

  • Adobe Content Viewer update yesterday is buggy

    Adobe Content Viewer update yesterday is causing my scrollbar to fall in the wrong position.
    This needs to be fixed ASAP!
    I have clients that are going to look at this today!

    This is currently being investigated
    This seems to be an issue with Content Viewer (v32.5) from the App Store.
    If I build one from the App Builder 32.4.4 (same v32.5), the bar is back to its original position.
    Not a solution but might be a workaround for some until this is fixed.

  • Idoc views updation, Workflow, Performance tuning techniques!

    Hello,
    Greetings for the Day!
    Currently my client is facing following issues and they seek an help/attention to these issues. Following is the current landscape of an client.
    Sector – Mining
    SAP NW MDM 7.1 SP 09
    SAP ECC EHP 5
    SAP PI 7.0
    List of Issues:
    Classification (CLFMAS idoc) and Quality (MATQM idoc) views tries to update before MATMAS idoc updates and creates the material in ECC table.
    At workflow level, how to assign incoming record approval request, put them in mask like functionality and approve them as bulk records.
    Performance tuning techniques.
    Issue description:
    Classification (CLFMAS idoc) and Quality (MATQM idoc) views tries to update before MATMAS idoc updates and creates the material in a table.
    Currently, client’s MATMAS idoc updates Basic data1 and Basic data2 along with other views and material gets updated in ECC table, but whenever record has classification and quality view to update via CLFMAS and MATQM idoc, these 2 idocs tries to search the material ECC table before respective MATMAS to update the table. As it does not have the basic data created for the material entire idoc fails. Kindly suggest the solution as in how we can align the process where classification and quality view will get update only after the basic data views gets updated to material master. Is there any way we can make views to be updated sequentially?
    At workflow level, how to assign incoming record approval request, put them in mask like functionality and approve them as bulk records.
    Currently, super users are configured within the system, they have 2 roles assigned to their ID’s, 1.custodian and 2.steward. In custodian role user assigns the MDM material number and check other relevant assignment to record creation request, user approves the material request and the request goes to steward role. As the 1 user has 2 roles, same user need not to checks everything again in steward role, hence user wants whatever request comes at steward user inbox, he shall be able to create one single group for those 20-30 records and on one single click entire materials shall be approved and disappear out of his workflow level. Is there any way by which it can be achieved.
    Performance tuning techniques.
    Currently, client MDM system response time is very very slow, after a single click of action it takes long time to reflect the action within MDM. Material database is almost around 2.5 lakh records, standard structure has been used, not a complex landscape structure. Both ECC and MDM server is on single hardware, only the logical separate DB. Kindly suggest performance techniques if any.
    Kindly suggest !
    Regards,
    Neil

    Hi Niel,
    Kindly try the below options
    -> Performance tuning techniques.
    SAP Recommendation is to put the application ,server and Database in different Boxes . I am not sure how you managed to install both MDM and ECC in the same box but that is a big NO NO .
    Make sure there is enough hardware support for a separate MDM box.
    -> Classification (CLFMAS idoc) and Quality (MATQM idoc) views tries to update before MATMAS idoc updates and creates the material in a table.
    MDM only sends out an XML file , so you definitely need a middle ware (PI) to do the conversion.
    You can use PI logic ( ccBPM) to sent the IDOC is the necessary sequence .
    Else you can maintain this logic in the Processing code of ECC system .
    PS : The PI option is more recommended.
    Regards,
    Vag VIgnesh Shenoy

  • ADF View - Updated key values not updating referenced data in view (JSP)

    I have a many-to-many relationship that links 2 tables (2 mandatory and 1 optional).
    Relationship 1 is created via a view link.
    Relationship 2 is selected from a view.
    The optional relationship (3) is required based on a flag in the corresponding row for relationship 2.
    To achieve this I have a page with 2 steps, step 1 selects relationship 2 and then the page decides whether relationship 3 is required or not.
    The many-to-many relationship is created via a VO that contains the many-to-many table and references and includes some attributes from the other tables.
    When I first select the relationship 2, the attributes from the referenced table are then set within the VO and by looking at these I can make my decision.
    Now here's the problem....
    If I go back and select and different relationship 2, the Id attribute (for the many-to-many table) is updated but the attributes are unchanged, this means that the flag I need to check is invalid.
    Also, when I then select the appropriate value for relationship 3 (if required), the associated Id attribute is set but the referenced attributes from this table are not set (these are needed for other purposes).
    Is there some setting I'm missing?
    Is there some call I need to make to update the referenced data?
    I know I could make all of my decisions based on the VOs that I am selecting from but it's much simpler (and less code) to just use the 1 view (less chance of bugs) - plus i'd like to understand why this is not working.
    Thanks
    Al

    I don't need to check it for data integrity reasons, I need to check the contents of certain values to determine what to do next, before i commit the data.
    For example, if flag a is set then ask for extra information 'X' otherwise ask for extra information 'Y'.

Maybe you are looking for

  • Faxes are on status PROCESS even after getting the ouput

    Hi Experts, We are facing an issue with faxing. Users are getting the fax outputs successfully. However the status of the same in SP01 is still showing the status as " PROCESS". Can anyone have an idea why it is not getting updated properly ? SAP Rel

  • How can i update?

    while im updating my phone turns off and updating fails..what should i do?

  • Why No Demo Version Of FCE/FCP ?

    Over the past year I have seen at least a couple of requests for a Demo version of FCE/FCP. It would seem sensible for Apple to give away 30-Day Fully Functioning Demos to prospective purchasers. A number of other makers do it - like Adobe with their

  • Process Messages

    Hi All, I am sending data from SRM System to R/3 via XI. The message is being successfully processed on both XI and SRM systems, but because of an RFC connection failure, the message could not reach the R/3 system and inturn result in an Idoc creatio

  • Is Apache OpenOffice 4.0.1 safe to download?

    I have OpenOffice 3.3.0 installed from several years ago and wish to update to Apache OpenOffice 4.0.1 and wish to know if this is safe and will a download be stopped by Gatekeeper which is set to accept "Mac App Store and identified developers"? Are