To avoid the problem of my trigger changing

Hey, guys:

I have a perhaps silly question. I need maintain a table named 'SOR_Email_Config' with a trigger. Whenever there is an event to update a column named "Current_Setting" to "n" 'Y' in a row, this trigger needs to check the other rows in the same table to ensure that Current_Setting of the other lines is 'n', if the other rows 'Y' in the column 'current_setting', the needs of relaxation to update to 'n'. the code is as follows:
CREATE OR REPLACE TRIGGER SOR_NOTI_CONFIG_UPDATE_TRG 
BEFORE INSERT OR UPDATE OF CURRENT_SETTING ON SOR_EMAIL_CONFIG 
FOR EACH ROW 
WHEN (new.current_setting='Y') 
BEGIN
  
  update SOR_EMAIL_CONFIG
  set current_setting='N';
  
END;
Of course, I had a problem of mutation, then how can I implement this trigger to avoid any problem of mutation?

Thanks in advance

Sam

Hello Sam,.
you are posting in the wrong forum, because this one is for the SQL program, tool and not for general questions of SQL.
That said, you can try the autonomous operations, but this could lead to blockages and other bad things.

Hope that helps,
dhalek

Tags: Database

Similar Questions

  • What is the problem with my trigger :(

    Hi friends

    What is the problem with this trigger please
    SQL> select object_type from user_objects where object_name='CE_STMT_INT_TMP';
    
    OBJECT_TYPE
    -------------------
    TABLE
    
    SQL> create or replace trigger ce_stmt_int_tmp_trg1
      2  after insert on ce_stmt_int_tmp
      3  for each row
      4  begin
      5      :new.column7 := 'checkno_test';
      6  end;
      7  /
    create or replace trigger ce_stmt_int_tmp_trg1
                              *
    ERROR at line 1:
    ORA-04084: cannot change NEW values for this trigger type
    Thank you very much

    I guess you mean that SQL * Loader is insertion of the value of the column, not not to date. You can override the value SQL * Loader is the insertion in a level line BEFORE INSERT trigger.

    Justin

  • I like the develop module, but I'm doing something wrong in the library in library, under 'Catalogue, all the photos', all my photos appear showing the stars, cropping, and development. The problem is that these changes are not for the photos on my hard d

    I love the develop module, but I'm doing something wrong in the library

    In the library, under 'Catalogue, all the photographs', all my photos appear showing the stars, cropping, and development. The problem is that these changes are not for the photos on my hard drive. When I re-import them in Lr, the changes are not there. My workflow is to do nothing after development or export them to the original with a new file name destination. Anyway, it is that they get a new file name without change of development when they are imported into Lr.  Please help (PC user)

    And others have explained, Lightroom does not apply the changes to the file. All changes are stored in the catalog, and then applied to the image when it is displayed in Lightroom. If you want a copy of the image with any changes so that you can share with others or send it to a laboratory to print, then you must export a copy of this image by using the export dialog box in Lightroom.

    Features of Lightroom as well by its design. The images that you import are always left in their original condition, unmodified.

  • Lightroom Sdk: How avoid the re publish all after changing the settings of service?

    Hi all

    I'm working on a publishing service for lightroom. I would like to have the build of lightroom in the dialog box "you have changed the settings for this publish connection" to show.

    All my settings affects all pictures and we don't need to re publish all. But when users see this dialog box, they don't understand and re publish all a lot of time.
    It is useless and wasting time.

    I have no idea to avoid the tthat. I wish I could say (as for metadata) what parameters trigger a re publish action.

    Thank you for your help,

    All the best,
    Martin

    If you repost this in the Lightroom SDK forum, it is more likely, someone knowledgeable could see and answer.

  • Global Temp table to overcome the problem of mutation Trigger

    Hi all. I need to remove a line in a table and thought that I would get around the issue of trigger mutation creating a GTB table. I created 2 different triggers. One is a level line, the other trigger a statement-level trigger.
    The first trigger collects the information required to identify the row I want to delete. It is:
    CREATE OR REPLACE TRIGGER Requisition_Capture
    AFTER UPDATE OF Delivery_Code on Supply_Items
    FOR EACH ROW
    BEGIN
    
      IF :NEW.Delivery_Code = '#' THEN
        INSERT INTO Requisition_Storage
          (Req_Code)
        VALUES
          (:NEW.Requisition_Code);
      END IF;
    END;
    And the second trigger deletes the line:
    CREATE OR REPLACE TRIGGER SUPPLY_ITEM_RESET
    AFTER INSERT ON Requisition_Storage
    
    DECLARE
    
    BEGIN
    
      DELETE FROM Supply_Items r
       WHERE r.Requisition_Code =
             (SELECT t.Req_Code
                FROM Requisition_Storage t, Supply_Items s
               WHERE t.Req_Code = s.Requisition_Code)
         AND r.Order_Qty = 0;
    
    END;
    The GTB's stores following the information that I need to remove the line. :
    -- Create table
    create global temporary table REQUISITION_STORAGE
    (
      req_code VARCHAR2(20)
    )
    on commit delete rows;
    When the Delivery_Code column is updated in the Supply_Item table and the value is reset to ' # ', that I want to capture the Requisition_Code in the Building, so I can run the statement-level trigger and remove the reset line. However, I still have a problem of error mutation. What Miss me?

    The statement-level trigger would need to be a Supply_Items AFTER UPDATE TO for this to work around the problem of trigger mutation. You must ensure that your UPDATE has finished update all rows to be updated before your statement-level trigger executes.

    As has been pointed out, however, the willingness to work around a trigger mutation error almost always indicates that you have a problem of data model. And you are almost always better served by setting the data model to work around the error.

    Justin

  • Question: How to avoid the problem-solvers Skype

    Hello, Skype, I had a quick question here.

    Because recently people solved my Skype account, knowing my IP and abuse by sending incessant attacks, I deleted some of my Skype accounts but I was wondering. Is there a way where you can avoid people to solve your Skype account only allowing direct connections to your contacts.

    I've been looking and lurking around the internet for advice, but they do not seem to help one thing here, and that's why I was wondering is how and what to do now. Because it's really bugging me that I am in need to delete accounts just because one doesn't know how to act normal.

    Hello

    You should NEVER let someone else know your IP address. The next time you need help, you should visit this Forum.

    TIME ZONE - US EAST. LOCATION - PHILADELPHIA, PA, USA.

    I recommend that you always run the latest version of Skype: Windows & Mac

    If my advice helped to solve your problem, please mark it as a solution to help others.
    Please note that I usually do not respond to unsolicited private Messages. Thank you.

  • Firefox crashes when it starts. I tried to reset it; I uninstalled and reinstalled no question. The problems started after I changed my video card

    Crash ID: bp-1c18c383-28e4-426c-96a7-ff97e2130906
    OS: Windows 7 SP1 64-bit
    I had to change my video card, immediately after this FF started crashing at the beginning.
    The graphics card is a Nvidia GeForce 210.
    I tried to:
    -Reset FF;
    -uninstall, delete the registry, reinstall it;
    -Windows Update;
    -Update (311.06) video card drivers
    but no way.
    I can start FF mode without failure.
    Any help will be really appreciated.

    I solved it by disabling hardware acceleration in the FF options.
    There seems to be a conflict between FF and some drivers from Nvidia.

  • I'm trying to reduce the duration of the google navigation and search boxes without any succuss. Numerious times the site was requested, but no response is the problem. I can change the size by using the line that separates the two boxes, but I only

    I added a cus 06/25/10, wanted to shorten the google search and navigation bars to see, but can't. Have re-installed the google toolbar, have chosen the version of firefox as my default tool bar and can then change the width, but when a box shortens the other if extension always fill the width of the screen. Customize toolbar doesn't give any options to reduce the width of toolbar, I am at a total loss. Would love suggestions if you have correctly fixed this.

    This has happened

    Each time Firefox opened

    is 25/06/10

    The address bar and the search bar have a flex property and take all available space.
    You can change the relative size of the two with this resizer between two bars.
    You can only do this by adding a lot of space in the view > toolbars > customize window.

    You can set a fixed width by defining the min-width and max-width for the same value.

    Add code to userChrome.css below @namespace.
    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #urlbar-container {max-width:400px!important; min-width:400px!important;}
    #search-container {max-width:200px!important; min-width:200px!important;}
    

    You can choose your own values as long as the min-width and max-width for each bar have the same value.

  • How to create Redo Log as a good way to avoid the problem of performance

    Hi Experts,

    I work in the following environment.

    OS - Windows server 2012

    version - 11.2.0.1.0

    Server: production server

    1 to 10 of each month, we have huge process. Like many DML and ddl involve.

    I've implemented the RMAN also.

    My Alerts log entry is as below,

    Kills Sep 08 17:05:34 2015

    Thread 1 cannot allot of new newspapers, 88278 sequence

    Private stream flush is not complete

    Currently journal # 1, seq # 88277 mem # 0: D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO01. JOURNAL

    Thread 1 Advanced to record the sequence 88278 (switch LGWR)

    Currently Journal # 2 seq # 88278 mem # 0: D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO02. JOURNAL

    Kills Sep 08 17:05:38 2015

    Archived journal 81073 extra for each sequence 1 88277 0x38b3fdf6 dest ID thread entry 1:

    Kills Sep 08 17:05:52 2015

    Thread 1 cannot allot of new newspapers, sequence 88279

    Checkpoint is not complete

    Currently Journal # 2 seq # 88278 mem # 0: D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO02. JOURNAL

    Thread 1 Advanced to record the sequence 88279 (switch LGWR)

    Currently Journal # 3 seq # 88279 mem # 0: D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO03. JOURNAL

    Kills Sep 08 17:05:58 2015

    Archived journal 81074 extra for each sequence 1 88278 0x38b3fdf6 dest ID thread entry 1:

    Kills Sep 08 17:06:16 2015

    Thread 1 cannot allot of new newspapers, sequence 88280

    Checkpoint is not complete

    When I check in the internet I found a few points and need clarity also by the following.

    -It is recommended that this switch Redo log 5 times maximum per hour, but I have this time of maximum peak about 100 redo log changes occur.

    -It is recommended to have the large size of the Redo log. But I have 3 Group of redo and each size is 50 MB by default.

    -My group of Redo log not multiplexed and it by default with each group have only a single Member

    Group 1 - D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO01. JOURNAL

    Group 2 - D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO02. JOURNAL

    Group 3 - D:\APP\ADMINISTRATOR\ORADATA\AWSPROCESS\REDO03. JOURNAL

    And advised by experts with add that again group will give more performance in the other location. Is it mean that I need to add the Redo log as a different group, player or Redo Log itself I need to replace the other location.

    Say in the end, My Live server works with the location and size of restore default. I'm trying to create a better way and get all confused

    How to do it perfectly.

    Experts, please share your comments to my environment to log redo instance as better through your comment or recommended weblink based on my above needs, or a document.

    Thanks in advance, if you need more information to help me, then ask me, I'll share you.

    Hello

    You can't resize an existing redo log group.

    You will need to create 3 new redo log groups and drop old log redo (with 200 MB size) groups.

    Here you can find a good explanation: DBA for Oracle tips Archives

  • How to avoid the problem of blocking

    Hi all

    I use Oracle 9.2.0.4 on RHEL4. This time when the user seeks to insert data in a module of paricular registration in a single row, it takes more than an hour.
    SQL> select EVENT,TOTAL_WAITS,TIME_WAITED,AVERAGE_WAIT from v$sessIOn_event wher
    e sid=339;
    
    EVENT                TOTAL_WAITS TIME_WAITED AVERAGE_WAIT
    -------------------- ----------- ----------- ------------
    enqueue                     1156      346494          300
    db file sequential r           4           0            0
    ead
    
    SQL*Net message to c         383           0            0
    lient
    
    SQL*Net more data to          38           0            0
     client
    
    SQL*Net message from         383        6136           16
    
    EVENT                TOTAL_WAITS TIME_WAITED AVERAGE_WAIT
    -------------------- ----------- ----------- ------------
     client
    
    SQL> select l1.sid, ' IS BLOCKING ', l2.sid    from v$lock l1, v$lock l2
            where l1.block =1 and l2.request > 0
            and l1.id1=l2.id1
            and l1.id2=l2.id2;
    
           SID 'ISBLOCKING'         SID
    ---------- ------------- ----------
           111  IS BLOCKING         181
           178  IS BLOCKING          53
           178  IS BLOCKING          69
           178  IS BLOCKING          71
           178  IS BLOCKING          80
           178  IS BLOCKING         154
           178  IS BLOCKING         173
           178  IS BLOCKING         191
           178  IS BLOCKING         230
           178  IS BLOCKING         252
           178  IS BLOCKING         255
    
           SID 'ISBLOCKING'         SID
    ---------- ------------- ----------
           178  IS BLOCKING         259
           178  IS BLOCKING         290
           178  IS BLOCKING         339
           178  IS BLOCKING         399
    
    15 rows selected.
    
    SQL> select PCT_FREE,PCT_USED,INI_TRANS,MAX_TRANS from dba_tables where TABLE_NA
    ME='OS_STU_COURSE';
    
      PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS
    ---------- ---------- ---------- ----------
            10                     1        255
    Please suuggest me...
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Of course, as a bitmap index implicitly locks all keys with identical values.

    -------------
    Sybrand Bakker
    Senior Oracle DBA

  • Flexographic distortion/scaling of the problems... Help!

    Hello.

    I'm having a problem with the end of printing InDesign (Cs3 Version 5.04).

    I'm trying to distort an document to flexographic printing purposes.

    Points in the mesh areas change causing the image to change/degrade.

    The selected areas are in the text is very sensitive because the outlines of the text become jagged points after "Scaling" distortion (Print > Setup > Options > scale > % > * unchecked limited proportions).

    Image degradation is only present in the film after doing this in InDesign. Quality is a fine print to a 100% constraint.

    This problem does not exist when I send the same image in a document Quark scaled down using there FlexScale extension.

    The document consists of an imported file Photoshop.TIFF of a certain type of projected grayscale, nothing crazy.

    All & all help will be greatly appreciated... ideas and theories are good as well...

    Out of curiosity, what kind of RIP/device are you printing to? I can't duplicate that with my printer which is, according to me, ignoring any prior information of InDesign and using its own. Are you print separations, composite, or in-RIP separations?

    Here is a possible workaround that may or may not prove acceptable to you. Export the pages in PDF format. Then place the PDF in a new InDesign document. The PDF file imported with your different X and Y scaling factors in the new document to the scale and print at 100 X 100%. Since you're using CS3 (and not an earlier version), you can also try placing the InDesign itself document in the new document and scale here (without the need for a PDF export). Either of those who avoid the problem?

  • The problem of the driver NOR DMM 3.0.1 update

    Hi, I'm trying to download the new version 3.0.1 of the DMM in my computer, however, he said "the compressed (zipped) folders error: Windows cannot open the file, the compressed (zipped) folder is invalid.

    did anyone get this problem? I have already download twice, but the problem remains the same.

    current version of DMM: 2.9

    Hello!

    I just tried to download the zip file myself, and I had no problems with it (even if it was in the network of the company, that may have some effect).

    However, a quick search revealed the following Microsoft KB: Zip files downloaded with Internet Explorer are not stored on your computer

    The error you described seems to occur when you use Windows XP and download through Internet Explorer by default Zip program files compressed (zipped).  There seems to be several solutions to this problem, which is the link.

    We also provide a small Downloader application with NOR-DMM 3.0.1 which avoids the problems caused by interrupted data transfers.  You can also try that give it a shot instead of download the zip file raw (you get the same file to be in the end).

    Please let us know if this solves your problem.

    Thank you

    Tobias G.

    National Instruments

  • The predefined names have been changed automatically

    Hi all, I need help in the next issue.

    I bought a Pack of preset, then I installed this pack with all the presets folder in the location of path following C:\Users\user\AppData\Roaming\Adobe\Lightroom\Develop Presets. When I open Adobe Lightroom everything works fine and the presets work without any problem. The problem starts when I change the names predefined in the installed folder. Example: If I have 50 presets, and I add numbers or letters, rename the name of origin to obtain a better record and made to measure, when I open Adobe Lightroom presets are mixed up and the names are not displayed my changes. Is there a method to change the name of the file in the package folder (using software that rename master) keeping the name changes in Adobe lightroom?

    Do you know how to solve this problem?

    Thank you

    Yours sincerely!

    Hi gustavoa

    Greetings!

    The problem starts when I change the names predefined in the installed folder.

    Please rename the Lightroom presets itself, and not the location of the file

    You can see the Manage develop Presets in Lightroom and you rename Presets Lightroom

    Hope that helps

    ~ Assani

  • My computer has Windows and Acrobat Reader DC.  When I open a PDF file sent there are several fonts instead of one.  The only difference I can find is properties - font - Arial - Type of real fonts: Type 1 instead of TrueType. If this is the problem how t

    My computer has Windows 7 and Acrobat Reader DC.  When I open a PDF sent there are several fonts instead of one.  The only difference I can find is 'Properties - font - Arial - Type of the actual is of Type 1 fonts' instead of 'TrueType '.  If this is the problem, how can I change the Type 1 for TrueType, and if not, what could be the problem and the fix?

    It cannot be resolved with Reader. Sounds like an issue that will be attached to the end of the creation of embedding fonts.

  • How to avoid the cache of the browser Mozilla Firefox?

    Hello

    Firefox cache is driving me crazy:

    -browser.cache.memory.enable
    -browser.cache.disk.enable

    Some reports return an incorrect value, because the browser cache is used... Firefox does not detect the changes!
    I don't want to ask all users of my application to these 2 settings set to false.

    Is there a way to avoid the cache?
    Or to change HTTP server setting?

    Thank you

    Thomas

    Hello

    Yep - you might want to open a new thread with "BUG" in the title, so that a person can pick this up.

    You can recreate this feature manually, if you wish:

    1 create an application to the element called G_UNIQUE_ID for example

    2 - create a PL/SQL application process that runs "Before Header". This could be something like:

    DECLARE
      vID NUMBER;
    BEGIN
      vID := TRUNC(DBMS_RANDOM.VALUE(1000000, 1000000000));
      :G_UNIQUE_ID := vID;
    END;
    

    1000000 and 1000000000 are low - and - upper limit of a random number

    3, and on the branch as part of the request, put:

    &G_UNIQUE_ID.
    

    Andy

Maybe you are looking for

  • How can I add a device

    How can I add a device

  • 19.0.2 'problem upgrade '.

    I leave Firefox 'upgrade' 19.0.2 on my Windows 7 laptop today. It is even impossible to load a page. It is all display tabs without loaded content. Displaying an address or a search does nothing, the browser ignores just my request. There is nothing

  • Previous uploaded photos disappeared when I downloaded more photos.

    I had downloaded photos to my iPad to my PC using iTunes when I got my iPad Mini.  I downloaded some pictures yesterday and the previous photos, I had downloaded are now gone. How can I download more pictures without losing the photos that I've saved

  • Toshiba Recovery Disc help

    Hello. Last week, I had to do a full system restore to remove a virus. Because I didn't have any disk boot of Windows 7 at the time, I decided to boot linux (ubuntu) on the computer to make sure that my system works ok. Today, I received my discs of

  • Satellite C650 - unable to connect to message

    I have my Satellite C650 connection problems to my home network. At least tries to connect to the network I get an unable to connect to the message, if I leave the phone alone for 15 minutes it usually will have connected when ICome back.I have also