How can I implement a recursive update within triggers?

Given
INSTANCE (table)
INST_ID
etc.
INSTANCE_STRUCTURE (table)
PARENT_ID (fk to INST_ID)
CHILD_ID (fk to INST_ID)
And that I COULD write code which recursively navigates the hierarchy (ie. START WITH parent_id = ? CONNECT BY PRIOR child_id = parent_id) and issues UPDATEs to each "child" along the way, thereby propogating the desired update, how can I accomplish the same thing using triggers?
Keep in mind I am using Oracle 7.3 and I have no choice. Also, the DBA is very difficult to get a hold of and I have no idea if there may be some server settings which are preventing some of my attempts from succeeding.
Of course the simplest method is to make an update trigger on INSTANCE select all CHILD_ID from INSTANCE_STRUCTURE and issue UPDATE to each which, in turn, would invoke the same trigger, however, we can't have a mutating table, now can we?
Next, I tried the old global variable in a package bit. That's when I first started getting this "end of channel" business which essentially disconnects me from Oracle (while using SQLPlus). I started to debug that, and then other users started getting errors ... apparently due to the global variable being global ACROSS sessions ... which I did not expect (correct me if I'm wrong and I can try it again), however, due to the amount of data I'm dealing with in any one particular line of hierarchy, I'm not sure I wouldn't get an error anyhow ... particularly if I have to maintain a global array for everyone at once. Anyhow, it was during that, that I realized the "too many open cursors" thing and so I started working with START WITH CONNECT BY to identify all rows which must be dealt with.
Then, I tried setting up some new tables (as opposed to global variables) in which I would identify userenv('sessionid') and other data so that a BEFORE UPDATE, FOR EACH ROW trigger could check to make sure that the AFTER UPDATE trigger had not begun yet (IOW, not recursing yet). Basically, everything's fine until the AFTER UPDATE trigger tries to apply UPDATEs for the children (identified from a cursor on START WITH CONNECT BY) ... then I get the "end of channel" thing again.
Obviously, this whole thing is an attempt to denormalize some data for performance reasons.
Any help would be appreciated.
Thanks.

Nevermind, I figured somethin' out.

Similar Messages

  • How can I implement data type map?

    The getString() method of java.sql.ResultSet interface is not efficient enough.
    I want to map any data type to VARCHAR type,then use the getBytes() method to get the value.
    How can I implement it.
    I know proc can implement it, simply set selda->T[sli] with 1 for any field.

    Hello,
    What's your LabVIEW version ? Do you have a simple example program which demonstrates this behavior ?
    I found another discussions related to your issues with Xcontrols:
    updating type defs in Xcontrol Facade
    No Data Change event generated for a XControl in a Type Def
    XControl facede.vi 
    Hope this helps.
    Regards, 
    Steve M.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Vidéo-t'chats de l'été : présentations techniques et ingénieurs pour répondre à vos questions

  • How can we implement SSO in SP2013

    Hi,
    How can we implement SSO from other applications to SP2013 web app.
    Please suggest with an example.
    Thanks,
    Krishna
    Krishnasandeep

    Basically  it is used to store credentials in a safe way. My article at
    http://sharepointdragons.com/2012/02/13/creating-a-bcs-net-assembly-connector/ discusses an example where it is leveraged within other SharePoint technology (BCS) but you can also use the object model to retrieve credentials and get login pages etc. for
    free provided by the Secure Store Service framework.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • How can I ignore an app update and delete it from list?

    iPad 2 16GB 3G -- iOS 6.1.3 (not jailbreaked)
    SInce few weeks i have an update in App Store/Updates for the AVPlayerHD app. I never want to apply and install this update, because it is remove a feature from the app (Removed DTS audio decoding due to patent trouble). I need the DTS audio decoding, so i ignored this update, but how can i remove it from updates list without apply?

    You can't delete it off the list but you can ignore it.

  • How can i use Itunes to update more than one IPad with more than one owner

    How can i use Itunes to update more than one IPad with more than one owner?  I own an IPad and my wife owns an IPad.  I want to use my system to update both IPads.  We have different Apple Accounts and different applications.  Is this possible?

    Of course, that is too easy.  I am such a bonehead.

  • HT204053 I changed my Apple ID on all my devices and Apple services but iCloud still shows my old Apple ID. How can I get it to update?

    I changed my Apple ID on all my devices and  services but iCloud still shows my old Apple ID. How can I get it to update?

    I asked the Apple Tech support people and their advice worked for me, it's a setting on the iPad itself. see below.
    Follow the below instructions to sign in with your new account name.
    1) From the home screen, tap Settings
    2) Tap Store
    3) Tap Sign Out
    4) Tap Sign In
    5) Enter your current account name "xxxx" and your password  and tap OK.
    If you are still unable to change the sign in name on your iPad, please sign into your account on your computer and then sync the iPad so the changes will be updated.
    good luck

  • Hi, how can I disable iTunes from updating to v. 11?

    Hi, how can I disable iTunes from updating to v. 11?

    Olliev wrote:
    How do I disable itunes on my iphone 4s?
    iTunes app on the iPhone is for purchasing music.
    The fact the iPhone starts playing when connected to your car stereo is a function of your car bluetooth system.
    Consult your car dealer/bluetooth system manual.
    I have attempted to delete all music from the device (so there would be nothing to play), but 1 song remains in the iphone memory and I have been unable to delete that song.
    Connect the iPhone to computer and select it in iTunes.
    Click the Music tab and uncheck Sync music.
    Then click Apply at lower right of iTunes.

  • How can I detect a certain text within a field within CASE using IF

    Dear all,
    for a transformation / generation of values receiving from R/3 into BW I try to
    manupulate three fields. I have a problem detecting a string in a field.
    I am using a CASE with several WHEN clauses on one field. Depending on the
    value, an IF is integrated. There I look into another field evaluating, if it contains
    a certain string. E.g. IF STRING CP 'xyz' OR 'abc'.
    System gives error for the locigal expression. I also tried CS, but same error.
    How can I detect a certain text within a field and which is the right logical
    expression.
    Many thanks in advance!!!
    Claudia

    Hi,
    Folow the blow example...
    May be it helps....
    DATA: hex1 TYPE string,
          hex2 TYPE string.
    hex1 = 'FFFF'.
    hex2 = '123FF'.
    IF hex1 CP hex2.
    ENDIF.
    Cheers,
    SImha.

  • How can I start a new paragraph within the same table cell?

    In Numbers, when adding text within a table frame, how can I start a new line within the same frame (rather than advancing to the next cell)?  I'd like to enter a mini-list of several items of various lengths of data.

    While Wayne's answer solves your problem, another possibility is to uncheck the box at the bottom of the Table inspector for "Return key moves to next cell." If that is unchecked, the return key types a paragraph return within the cell (the same as Option Return with the box checked).
    With that box unchecked, Shift Return types a soft return (new line without a paragraph break).

  • How can I create a second sheet within a tab?

    How can I create a second sheet within a tab? I have tried to add another table but it shows up on top of the existing table. I want to have two sheets or tables within one tab so I can further sort and categorize within a section. Is this possible? Thanks for all the help!
    -Bridget Altman
    Administrative Associate
    Discover Abroad at the University of Georgia

    You can insert a new table on the View Responses Tab with
    Insert > Table
    You can also insert a new sheet with a new table with
    Insert > Sheet
    You can drag and drop the table if it does overlap with another table. Just select the table you want to move and drag the top-left corner of the table to move it.
    Hope this helps
    Gen

  • How can i reference a MIME object within a correspondence format through...

    how can i reference a MIME object within a correspondence format through TX oofo or se71?
    Hi, I need to put a MIME object within a correspondence's format that i've already done through Tx oofo. My problem is, that i don't know exactly how can i make the reference of that MIME object in the format? and What structure type do i have to use in order to make appear the MIME object in my correspondence's format? Does anybody can help me with this?   
    Regards    Hector

    Frank,
    I tried to find some examples/samples on how to create CollectionModel for a table component but not successful.
    Can you clarify the following ?
    1. "CollectionModel" is referenced only by af:table attributes "value", "selectedRowKeys" and "selectionListener".
    The rest of af:table attributes such as "rows", "fetchSize" used to reference the iterator binding in the binding container via the EL expression "#{bindings.VOIteratorBinding.xxx} .
    What should I replace that EL expression with?
    2. I heck out the bean method to create the CollectionModel as following, is it close to what you mean?
    public void initBusinessDataDashboardView() {
    OperationBinding operation = BeanUtils.getOperationBinding("getPanelBusinessData");
    Map params = operation.getParamsMap();
    Key panelKey = getPanelInfoView().getKey();
    params.put("panelKey", panelKey);
    params.put("maximizedView", false);
    panelView = (ViewObject)operation.execute();
    // Heck code to create CollectionModel
    RowSet rowSet = panelView.getRowSet();
    ArrayList rowList = new ArrayList();
    while (rowSet.hasNext()) {
    rowList.add(rowSet.next());
    model = new ChildPropertyTreeModel(rowList, null);
    // To be used to set up af:table value, selectRowKeys, selectionListener via EL expr #{backingBeanScope.MyBean.model.xxx}
    public CollectionModel getModel() {
    return model;
    Am I on the right track?
    Edited by: Pricilla on May 4, 2010 2:20 PM

  • How can I create a sub-folder within my "Documents" folder?

    How can I create a sub-folder within my "Documents" folder? I have many similar documents that I want to group together. This will also un-clutter my Documents folder.

    Also, you can add a New Folder button to the Finder's toolbar by opening Finder, going to the View menu in the menubar, selecting Customize Toolbar..., and dragging the New Folder icon to the toolbar in the Finder window. Then it's just one-click for new folders wherever you want them.

  • How can I undo a software update?

    How can I undo a software update?

    That indicates something went wrong. Make sure no anti-virus software or firewalls are running on your system. Make sure iTunes is up to date. Then, follow the directions here to force the phone into recovery mode & restore it:
    http://support.apple.com/kb/HT1808

  • How can I implement a comfirmation window when closing javafx application?

    hi,guys
    I'd like to add a confirmation window when user is closing my javafx application,if user click yes, I will close the application,if no ,I wouldn't close it ,how can I implement this function?
    primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
                   @Override
                   public void handle(WindowEvent arg0) {
                        try
                             //todo
                        catch(Exception ex)
                             System.out.print(ex.getMessage()+"\r\n");
            });

    Hi. Here is an example:
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Pos;
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.scene.paint.Color;
    import javafx.scene.layout.*;
    import javafx.scene.control.*;
    public class ModalDialog {
        public ModalDialog(final Stage stg) {
         final Stage stage = new Stage();          
            //Initialize the Stage with type of modal
            stage.initModality(Modality.APPLICATION_MODAL);
            //Set the owner of the Stage
            stage.initOwner(stg);
            Group group =  new Group();
            HBox hb = new HBox();
             hb.setSpacing(20);
            hb.setAlignment(Pos.CENTER);
            Label label = new Label("You are about to close \n your application: ");
            Button no  = new Button("No");
            no.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                       stage.hide();
            Button yes  = new Button("Yes");
            yes.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                       stg.close();
             hb.getChildren().addAll(yes, no);
             VBox vb =  new VBox();
             vb.setSpacing(20);
             vb.setAlignment(Pos.CENTER);
             vb.getChildren().addAll(label,hb);
            stage.setTitle("Closing ...");
            stage.setScene(new Scene( vb, 260, 110, Color.LIGHTCYAN));       
            stage.show();
    }Test:
       import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.stage.*;
    * @author Shakir
    public class ModalTest extends Application {
         * @param args the command line arguments
        public static void main(String[] args) {
            Application.launch(ModalTest.class, args);
        @Override
        public void start(final Stage primaryStage) {
            primaryStage.setTitle("Hello World");
            Group root = new Group();
            Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
           primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
                   @Override
                   public void handle(WindowEvent arg0) {
                                    arg0.consume();
                        try
                         ModalDialog md = new ModalDialog(primaryStage);
                        catch(Exception ex)
                             System.out.print(ex.getMessage()+"\r\n");
            primaryStage.setScene(scene);
            primaryStage.show();
    }

  • How can I implement a real time datawarehouse

    Hi, I'm a little lost here but I want to know how can I implement a real time datawarehouse in sql server, I don't know if it is only to make the extraction process the shortest time possible.
    Thank you

    Hi Mega15, 
    I agree with everything Seif and Louw said, but I'd like to add that if you are using SQL Server 2012 or 2014 and you want to use DirectQuery or ROLAP mode (depending on what SSAS mode are you using, tabular or multidimensional) you may be interested on
    using columnar indexes on your base tables. 
    Analytical and aggregated queries will take GREAT advantage from these indexes, they will perform much better than with traditional B-Tree indexes in most of your scenarios. 
    Regards. 
    Pau.

Maybe you are looking for

  • Oracle Linux Calendar 9.0.4.2/10 and Fedora Core 5

    Hi folks -- I recently migrated from FC4 to FC5 (did a fresh install), and to my chagrin, the Oracle Calendar linux client install is now broken. This was running fine under both FC4 and RHEL 4. Here is the error I receive on any of the installs (sil

  • Unix system() system call in Java

    Hi, system() call in Unix is very helpfull when you need to implement a piece of code that is already implemented in an exsiting utility. Is there a way to achive a similar functionality? To put it in simpler words - is there a way, in Java, to call

  • URGENT Help with app syncing from iPhone

    i have an iPhone 4s and am upgrading iphones so i am doing a full sync but i have a problem with all my apps. i havent got any apps in my itunes as i deleted them all to save space. how do i get all the apps back onto itunes now that i am changing ph

  • Download photos from pc to I pad

    I ve all my photos on a windows pc and I would like to transfer into my I pad .How can I do that?

  • Updating bios from 1.4 to 1.9

    Hello I'm still running bios 1.4, thinking of updating. What have changed up to v1.9 (or which ever is the newest) since 1.4? Will I benefit from updating?