trigger for update field in a table with the sum of the fields to another table

My experience in creation of triggers and pl/sql in general can be described in terms of oracle with the null value. I practiced by creating arrays and applications on my personal server at home to help me with some of my work related tasks. Right now I am creating a trigger which will, after insert, update, delete on the update of the table assignment_time_track the area of the time_spent on the table of assignments with the sum of the time_spent on the assignment_time_track table fields. I hope that run on the sentence it is clear to the people other than me. I tried this script on my own using the tool of creation of trigger for Oracle Database Express Edition, but I get the following error:

Create a trigger failed, for the following reason:
ORA-06552: PL/SQL: ORA-06553 finished Compilation unit analysis: PLS-320: the declaration of the type of the expression is incomplete or incorrect

Here is my attempt to create the trigger on my own.

create or replace trigger "ASSIGNMENT_TIME_TRACK_T1".
AFTER
INSERT or update or delete on 'ASSIGNMENT_TIME_TRACK '.
for each line
Start
update assignments
Set time_spent = (select sum (time_spent)
of assignment_time_track
where assignment_time_track.name = assignments.name);

end;
/


If what I posted is not clear or more detail is needed, let me know and I will respond with a full description of tables and my goals for each table. Thanks in advance for any help. I also gladly accepts links to tutorials or lessons that explain how to do this kind of thing.

Published by: bobonthenet on March 9, 2009 14:01

I think I understand what you mean :)

Rather than use a trigger to keep the master table (assignments) in sync with the time spent on the details, it would be much easier to use a query to do this, maybe creating a view.

Something along the lines of

SQL> create table assignments
  2  (id number primary key
  3  ,name varchar2(10)
  4  );

Table created.

SQL>
SQL> create table assignment_time_tbl
  2  (id number primary key
  3  ,assid number references assignments
  4  ,time_spent number
  5  );

Table created.

SQL>
SQL> insert into assignments
  2  select rownum
  3       , 'a'
  4    from all_objects
  5   where rownum < 5
  6  /

4 rows created.

SQL>
SQL> insert into assignment_time_tbl
  2  select rownum
  3       , rownum
  4       , rownum * 3
  5    from all_objects
  6   where rownum < 5
  7  /

4 rows created.

SQL>
SQL> commit;

Commit complete.

SQL>
SQL>
SQL> select a.id
  2       , a.name
  3       , (select sum (time_spent)
  4            from assignment_time_tbl
  5           where assid = a.id
  6         )
  7    from assignments a
  8  /

        ID NAME       (SELECTSUM(TIME_SPENT)FROMASSIGNMENT_TIME_TBLWHEREASSID=A.ID)
---------- ---------- -------------------------------------------------------------
         1 a                                                                      3
         2 a                                                                      6
         3 a                                                                      9
         4 a                                                                     12

Tags: Database

Similar Questions

  • My iPhone with iOS 9.2.1 5s is deleting random contacts.  This happened for several months is not just with the last update of iOS.  Any suggestions?

    My iPhone with iOS 9.2.1 5s is deleting random contacts.  This happened for several months is not just with the last update of iOS.  It deletes recently used contacts and removes also from my iPad.  Any suggestions?

    That you synchronize your contacts with? A decision-making application supported on the computer, a Cloud Computing service?

  • An update on an index column with the same value generates an index to the top

    An update on an index column with the same value generates an update of the index?


    Thank you

    In addition to my previous answer, see also

    http://orainternals.WordPress.com/2010/11/04/does-an-update-statement-modify-the-row-if-the-update-modifies-the-column-to-same-value/

    Riyaj Shamsudeen has this to say:
    "+ We have an index on this column v1 and we update this column indexed too." Oracle was updating the indexed column? N ° if the values match the level of the indexed column, then the code of RDBMS isn't up-to-date index, a feature for optimization again. Only the row of table is updated, and the index is not updated. + "

    Hemant K Collette

  • recommended security cumulative ie8 and compatible display updates fail. can install it with the installer of standalone download but then ie8 does not connect. If I remiove update ie8 works very well

    recommended security cumulative ie8 and compatible display updates fail. can install it with the installer of standalone download but then ie8 does not connect. If I remiove update ie8 works very well

    Hi mikedav,

    Thank you for using the Microsoft Windows Vista Forums.

    Method 1:

    Microsoft has released a new "Fix it" solution that should automatically solve your problems with Windows Update.  Just click on the link below and follow the instructions.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    If you are not able to connect to the internet after you install the update, you need to optimize Internet explorer by following the instructions below.

    Method 1:

    Follow the instructions in the link below which will help you solve the problem.

    Tips for solving problems with Internet Explorer

    http://windowshelp.Microsoft.com/Windows/en-us/help/8038f9ac-9bf9-4809-8d75-fc42818d8af71033.mspx

    Method 2:

    Follow the instructions in the link below to optimize Internet Explorer.

    How to optimize Internet Explorer

    http://support.Microsoft.com/kb/936213

    Please post back and let us know if it helped to solve your problem.

    Kind regards

    KarthiK TP

  • KB955759 does not appear when I check the updates manually, but it appears with the yellow shield after you have enabled the automatic updates.

    original title: Windows Update acts confused - kb955759 does not appear when I check the updates manually, but it appears with the yellow shield after you have enabled the automatic updates.

    I just reset my CMOS settings, writing zeros for my hard drive, repartitioned, reformatted and used the recovery cd Gateway system to get my computer to Windows 98se - factory settings, except at the beginning of the recovery of the system, when it says "press any key for advanced options," I pressed a key and then I unchecked all the default (3rd party) applications including Norton and left only 2 checked: "Updated USB Hub" and "Windows Shutdown Supplement," while nothing has been installed, leaving only win98.
     
    Then I used my disc XP Home (SP2) update.  I, immediately after the upgrade to Windows XP, installed "Office XP with Frontpage, Developer Edition", then Norton 2012 before never connect to the internet.
    Then, I connected to the internet and continuously update of Norton, before ever hitting the Windows Update page. The first thing I did then was to activate Windows, and then activate the office.
    Then I hit the update of Windows "button" that says "get all your updates in one place... upgraded"Microsoft Update".  I, then, just kept hitting the page update and restart, until I find the SP3.  Then, I took a break, until the next day.
     
    I have an ADSL broadband, with a Linksys EtherFast PCI card.
     
    Then I got SP3, which installed without any problems.
    So I just kept "microsoft continuous update" manually (and reboot), until there is no more updates - EXCEPT, I always uncheck Windows Malicious Software Removal Tool - which was the only screening at the final stop for the night.  I think that I ticked the box "don't ask me about this update".
     
    Then, in the morning, after you have enabled automatic updates, I noticed the yellow shield - Windows security icon (or whatever it's called), so I clicked on it and checked it was tellimg me was available [when I checked "Custom Install (advanced users)"].  What showed was 1 update - 955759 KB.
     
    After the problem, already at the reformat (months and months), see the yellow shield telling me there are updates available, which were already installed (before rebooting), I checked manually on the internet with IE 8, pressing alt, "T", "U".  There is no updated list.  Then I checked through my history of update (twice), and KB955759 had not been installed.
     
    My update setting is to let windows download ('important') updates, but let me choose when to install them.
     
     
     
    What is the right - Windows Update (NO update important reporting) Site, or the yellow shield (reports [a] kb955759 [update])?
     
    I can not yet confirm he is supposed to be an update for XP home kb955759, because I was unable to locate any detailed documentation on this 'thing' that protect the yellow safety seems to think is a significant update.

    Comment 1: To my rquest, a moderator merged your thread in the Sub-forum Win7 updates with your wire in the Sub-forum of updates of Windows XP 20 Feb-12, c. 07:50 UTC.

    Comment 2: If you will not contact the MS Support on this issue?

    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Just for the heck of it, I have disabled the automatic updates, cleared my browser cache, checked manually, updates from microsoft (windows) and found none (with the exception of software malware removal tool windows [which I have not installed]).  Then, I turned the automatic updates on, and without even being connected to the internet, the yellow shield popped up with the kb955759 "update"...

    Repost...

    1. If you open Internet Explore (only!) to http://windowsupdate.microsoft.com and run a CUSTOM scan, KB955759 appears in results?... If so, you manage to install it and/or security updates available?

    2 after no. 1 above [<>], is the 'yellow shield' icon appears in the Notification area (on the left of your clock)?  .. and if yes, by clicking on the 'yellow shield' icon tells you that KB955759 or any other updates is ready-to-be-installed?  .. .and if so, you manage to install it?

    3 after doing 1 # & #2 above [<>], is KB955759 or any other updates offered as a ready-to-install update when you go off your computer?  .. .and if so, you manage to install it?

    ... I guess that clearing the browser cache does not erase 'downloaded' updates.

    Nope. If you want to clear the queue of the update...

    OPTION A:

    1. stop the automatic updates service:

    Start > run > (type or copy/paste) services.msc > click OK
    Double-click automatic updates > click stop
    (Stopping the service will take a moment)

    2 remove the contents of the download folder:

    Start > run > (type or copy/paste) %windir%\SoftwareDistribution > click OK

    Open the download folder and delete its content
    Close the window.

    3. start the automatic updates service:

    Start > run > (type or copy/paste) services.msc > click OK
    Double-click automatic updates > click Start
    (Starting the service will take a moment)

    OPTION B:

    1. open Internet Explorer (only!) to http://support.microsoft.com/kb/910336 [don't know the titles, etc..]

    2. make disappear/close the Troubleshooter automatically pop up.

    3 repaired 50202 in DEFAULT modes and AGGRESSIVE. [1]

    4 reboot.

    Does anyone know how to determine if software mailicious removal tool is installed on XP? [source ]

    Check the located log file...

    C:\Windows\Debug\ MRT. NEWSPAPER <>

    Related...

    ... This leaves us with the malicious software removal tool don't appear not.

    I guess I'll have to leave "auto-update" (I often have less than 65 M of free memory left and do not have enough memory to msrt) and don't assume no other current error. [source; 17 Aug-11]

    It's no wonder that you ended up having to do a clean install of Win98SE & then upgrade to Windows XP again!

    ================================================================
    [1] full Disclosure: the difficulty operating in AGGRESSIVE mode will remove your update history but not updates installed in Add/Remove Programs list.

  • Automatic updates (KB2656353 & KB2656370) always fails with the error code 0 x 643

    Automatic updates (KB2656353 & KB2656370) always fails with the error code 0 x 643 for several occations and continue to offer. Several attempts to install manually also failed. Help is very appreciated. Thanks: SEBUBE

    Automatic updates (KB2656353 & KB2656370) always fails with the error code 0 x 643 for several occations and continue to offer. Several attempts to install manually also failed. Help is very appreciated. Thanks: SEBUBE

    Try each of the methods of repair HERE. If none of these solves the problem, we'll go from there.

  • Windows Update error "windows update location must be replaced with the default windows location."

    Original title: Failed to automatically / thru fixit updated windows installation (another) indicates both failed 1 of 5. It says windows update location must be replaced with the default windows location

    XP86 running. Recently had installed the additional memory. Microsoft Update icon never goes away - seems like if 1 of 5 updates usually install on a group. Keep trying to install updates (even those) again and again. Sometimes we will not install and then moved the next time, he's trying to install the same updates, another a group. Worked through say fixit and details window update location must be changed to windows default = - but did not say how.

     

    Hello

    Have you tried Microsoft Fix - it?

    See the following article:

     

    Important: this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    http://support.Microsoft.com/kb/322756/

     

    You cannot install some programs or updates

  • KB2887069 Windows update fails to install, even with the audio drivers and uninstalled AV

    KB2887069 Windows update fails to install, even with the audio drivers and uninstalled AV.

    Background: I am setting up a pavilion of 500-164 equipped with OEM specs, specifically:

    -AMD/Radeon APU

    -Windows 8 6.2.9200

    -See sysinfo below for more details

    The PC brought to the specifications of the plant, with all Windows updates applied with the exception of KB2887069, which breaks down at the update.  With the exception of troubleshooting the failure of the update, none of the changes have been made.  The Windows KB2887069 update fails to install as well through the automated process when tried manually via a direct download.

    Additional troubleshooting measures to date include:

    -Uninstall the software OEM AV (Norton), then by restarting.

    -Temporarily disable all the features of Windows Defender.

    -Temporarily uninstall the audio driver (IDT High Definition Audio CODEC) OEM.

    -Realization of an analysis of the SFC system (with no error found).

    Results: The Windows Update full KB2887069 with a failed State and produced the following results.

    2014-11-15 19:25:08:807 3488 1 b 84 Misc = logging initialized (build: 7.8.9200.17099, tz:-0500) =.
    2014-11-15 19:25:08:807 3488 1 b 84 Misc = process: C:\Windows\system32\wuauclt.exe
    2014-11-15 19:25:08:807 3488 1 b 84 Misc = Module: C:\Windows\SYSTEM32\wuaueng.dll
    2014-11-15 19:25:08:807 3488 1 b 84 Manager:
    2014-11-15 19:25:08:807 3488 1 b 84 Handler: START: Manager: installation CBS
    2014-11-15 19:25:08:807 3488 1 b 84 Manager:
    2014-11-15 19:25:08:807 3488 1 b 84 Manager start installation of CBS update BCA9DC69-8FB6-4B79-8E1B-E706B32B55C9
    identity of 2014-11-15 session 19:25:08:807 3488 1 b 84 CBS Handler: 30409011_3339369637
    the package identity 2014-11-15 19:25:08:807 3488 1 b 84 CBS Handler: Package_for_KB2887069 ~ 31bf3856ad364e35 ~ amd64 ~ ~ 6.2.1.1
    2014-11-15 19:25:08:822 3488 1 b 84 Manager stand-alone installation with source=C:\Windows\SoftwareDistribution\Download\c3f79bd7f837c5015dba3018d0ab7d67\windows8-rt-kb2887069-x64.cab, workingdir = C:\Windows\SoftwareDistribution\Download\c3f79bd7f837c5015dba3018d0ab7d67\inst
    2014-11-15 19:25:12:567 3488 Manager e00 FATAL: CBS called error with 0x8007371b.
    2014-11-15 19:25:13:269 3488 1 b 84 Manager FATAL: full install of CBS update with type = 0, requiresReboot = 0, installerError = 1, hr = 0x8007371b
    2014-11-15 19:25:13:378 3488 1 b 84 Manager:
    2014-11-15 19:25:13:378 3488 1 b 84 Handler: END: Manager: installation CBS
    2014-11-15 19:25:13:378 3488 1 b 84 Manager:
    2014-11-15 19:25:13:378 880 fa0 Agent *.
    2014-11-15 19:25:13:378 880 fa0 Agent * END * Agent: installing updates [CallerId = wusa]
    2014-11-15 19:25:13:378 880 fa0 Agent *.
    2014-11-15 19:25:13:378 6676 1a0c COMAPI > COMAPI - RECOVERY -: install [ClientId = wusa]
    2014-11-15 19:25:13:378 6676 1a0c COMAPI - tender installation complete (successful = 0, succeeded with errors = 0, failed = 1, missing = 0)
    2014-11-15 19:25:13:378 6676 COMAPI - restart required 1a0c = No.
    2014-11-15 19:25:13:378 6676 1a0c COMAPI - WARNING: exit code = 0x00000000; Call error code = 0 x 80240022
    2014-11-15 19:25:13:378 6676 1a0c COMAPI-
    2014-11-15 19:25:13:378 6676 COMAPI COMAPI - END - 1a0c: install [ClientId = wusa]
    2014-11-15 19:25:13:378 6676 1a0c COMAPI-
    2014-11-15 19:25:17:605 6676 1 a 10 COMAPI - COMAPI: IUpdateServiceManager::RemoveService -.
    2014-11-15 19:25:17:605 6676 COMAPI 1 has 10 - ServiceId = {b043431c-3a5f-4bf5-b5b2-34a542b07e41}
    2014-11-15 19:25:17:683 6676 1 a 10 COMAPI IUpdateService removal scan volatile package service, serviceID = {B043431C-3A5F-4BF5-B5B2-34A542B07E41}
    2014-11-15 19:25:17:683 6676 1 a 10 COMAPI WARNING: ISusInternal::RemoveService failed, hr = 80248014
    2014-11-15 19:25:17:683 880 524 Agent WARNING: WU client omits CClientCallRecorder::RemoveService with error 0 x 80248014
    2014-11-15 19:25:18:385 880 1a7c report REPORT EVENT: 2014-11-15 19:25:13:378 - 0500 1 182 {807311FF-2CC0-45E2-B903-238AD59E6377} [AGENT_INSTALLING_FAILED] {3CE1E1A4-CA14-4F2A-BEA1-71029F73AFD6} 101 501 8007371 b wusa error content install Installation error: Windows failed to install the following update with error 0x8007371b: update security for Windows (KB2887069).
    2014-11-15 19:25:18:385 880 1a7c report CWERReporter::HandleEvents - WER report upload completed with status 0 x 8
    2014-11-15 19:25:18:385 880 1a7c WER sent report: 7.8.9200.17099 0x8007371b (0x8007371b) 3CE1E1A4-CA14-4F2A-BEA1-71029F73AFD6 install Unmanaged 101
    2014-11-15 19:25:18:385 880 1a7c report CWERReporter finish event management. (00000000)
    2014-11-15 19:35:18:718 880 1 to 28 in THE # to THE: initialization of automatic updates.
    2014-11-15 19:35:18:906 880 1 to 28 WuTask WU Uninit Manager tasks
    2014-11-15 19:35:19:795 880 1-28 Service *.
    2014-11-15 19:35:19:795 880 1-28 Service * END * Service: out of Service [exit code = 0 x 240001]
    2014-11-15 19:35:19:795 880 1-28 Service *.

    I find it peculiar that you just bought a HP computer brand new, still-in-the-box, which came with Windows 8, not 8.1, preinstalled Windows. That said, cross your fingers, roll up your sleeves and try the fix following multiple step, I cooked up just for your computer...

    ACTIONS

    [You may want to print these instructions for reference offline.  IMPORTANT => NO SKIP & perform all steps in one uninterrupted session!  [If a step said to restart, restart! ]

    1 right-click on the link, select SAVE TARGET as.... & download the Norton Removal Tool, save it to your desktop: ftp://ftp.symantec.com/public/english_us_canada/removal_tools/Norton_Removal_Tool.exe

    2. close all open applications (that is, anything with an icon on the taskbar).

    3. right click on the file that you saved in step #1 above and select run as administrator to run the Norton utility. DO TAP not your keyboard until the race ends, then restart.

    4. right-click on the following link and save the download to your desktop: ie8 - rereg.all.zip [1]

    4B. right click on the file that you saved in # 4 has & select EXTRACT ALL. This will create a new folder in Office also appointed ie8 - rereg.all. The folder contains both scripts below (plus a third that will NOT be).

    Note-online scripts are good for IE9, IE10 & IE11, too,

    5. close all open applications (that is, anything with an icon on the task bar), open the folder created in step # 4 b above & double-click on the file named ie8 - rereg.32on64.cmd to run the script.

    5 b. Repeat this for the file named ie8 - rereg.64on64.cmd then restart.

    6. reset Internet Explorer by the MANUAL of instructions on this page-online http://support.microsoft.com/kb/923737

    Note => for best results, check the option Remove personal settings .

    7 run the Windows Update Troubleshooter from start to finish by the first paragraph on this page-online http://windows.microsoft.com/en-us/windows-8/troubleshoot-problems-installing-updates [2]

    8. restart once more then test by launching a manual check of updates & see if KB2887069 any/all others updated and allows to install now. Follow all the instructions.

    9. assuming all went well, see if Windows 8.1 is available through the store Windows and, if so, if it will be properly installed. Still, follow all the instructions.


    http://Windows.Microsoft.com/en-us/Windows-8/update-from-Windows-8-tutorial
  • What's new in Win8.1?
    http://Windows.Microsoft.com/en-us/Windows-8/whats-new
  • 10. assuming that Win8.1 is now installed, perform another manual check for updates & install all Security updates offered (if any); Follow all the instructions.

    11. in response to this post with a status report. Also confirm (hopefully) that Windows 8.1 has been installed successfully.

    Good luck!

    ===========================================================
    [1] source: page http://iefaq.info/index.php?action=artikel&cat=42&id=133&artlang=en of my colleague IE MVP Kai Schatzl

    [2] full Disclosure: the difficulty operating in AGGRESSIVE mode will remove your update history but not the list of installed updates.

  • How do I pair for windows 10 laptop via bluetooth with the iphone 6

    How do I pair 6 + for windows 10 laptop via bluetooth with the iphone?

    You do not have. This isn't a feature of iOS. It has never been.

  • BlackBerry smartphones of the suggestions for a weather link that works with the storm

    Hi guys,.

    Suggestions for a weather link that works with the storm?

    I like this one:

    http://www.NOAA.gov/

    I put in my zip code, and then when he shot to the top of my local forecast I bookmarked this page in my Storm. It marks the latitude and longitude, so when I go there next time I have to weather day.

    Easy to read and not a bunch of gadgets ads cluttering it up.

  • What is the higher for Mac OS which is compatible with the Creative Suite CS5 Master programs?

    What is the higher for Mac OS which is compatible with the Creative Suite CS5 Master programs? I use OS 10.6.8.

    I think you're at max that he has been tested with:

    Adobe - Creative Suite 5 Master Collection: System requirements

    Later versions may or may not work.

  • I opened 2 emails that were in the folder spam from my email and that each contained an attachment zip 2 k and 3 KB. As I could not open directly in my email, I opened the zip files with the "open in" another app option. At the opening of th

    I opened 2 emails that were in the folder spam from my email and that each contained an attachment zip 2 k and 3 KB. As I could not open directly in my email, I opened the zip files with the "open in" another app option. When you open the zip files at this other app asked me if I wanted to extract zip files in a new folder, I have accepted, in both files .js (javascript) files there. I opened these .js inside this same application files and content files white text on black background and that seems to be a script file. My question is: my iPad Air has been compromised by a scam of viruses, such as the Trojan horse thieves and banking password especially as Dridex or Dyreza, the Trojans and ransomware as Locky, cryptolocker, or Teslacrypt. If that were the case, then what is the solution to get rid of these... Thank you.

    Simply delete them. It is not possible to install anything on iOS using this method. For good measure, you can remove and reinstall the application allowing you to open it with, but I don't really have that is actually needed.

  • How to write the trigger for update of 2 tables

    Hi all
    I have 2 tables,

    1.lv_data,
    It contains the following fields,
    emp_name        tot_days
     guru                    18
                
    2.leave_data
    It contains the following fields,
     emp_name          From_date              to_date            no_of_days       remaining_days
     guru                    02/05/2012          03/05/2012           2                         
    In the second table, if the data is inserted.
    the no_of_days will be calculated automatically (from to_date - From_date) + 1,

    Here, I need to write the trigger to update the remaining_days column,

    First table for all tot_days emp_name is 18 days,
    Thus, in the second table every time that the record is inserted.
    the remaining_days must be calculated as follows,

    remaining_days: = tot_days - no_of_days and this (calculated) value should be updated in the tot_days column in the first table (lv_data).

    Example:
    emp_name        tot_days
    guru                    18
                
    2.leave_data
     emp_name          From_date              to_date            no_of_days        remaining_days
     guru                    02/05/2012          03/05/2012         2                          16
    [/code  
    
    Now the first table should be updated like,
    emp_name tot_days
    Guru 16


    So I need to update to 2 tables,
    can someone help me to update these 2 tables through TRIGGER?

    Thank you
    Kind regards
    gurujothi

    Edited by: Gurujothi may 1, 2012 19:54

    It is generally considered bad practice to store the value even in 2 places. You are having the kind of problems that you are experiencing now. It is much easier to store in the main table and get the value from there where you need to show in your forms.

  • How to write the trigger for update or delete multiple columns in a table?

    Hello

    I create one in the form of table of sample_emp. In that, every time I want to change of name, team_id, team_leader_id, supervisor_id, manager_id it must store the update-able and old values of those in the job_history table. When I write the trigger for which it shows "ORA-04082 new or the old value not table level triggers. Here is my emp_table. My table also similar job_history like this. Need your help.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9
    EMP_IDEMP_NAMEDESIGNATIONTEAM_IDTEAM_LEADER_IDEMPLOYEEMANAGER_IDHIRE_DATERELIEVED_DATE

    --

    Thank you.

    Hi Joel,.

    Venky_prs wrote:

    Hello

    I create one in the form of table of sample_emp. In that, every time I want to change of name, team_id, team_leader_id, supervisor_id, manager_id it must store the update-able and old values of those in the job_history table. When I write the trigger for which it shows "ORA-04082 new or the old value not table level triggers. Here is my emp_table. My table also similar job_history like this. Need your help.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9
    EMP_ID EMP_NAME DESIGNATION TEAM_ID TEAM_LEADER_ID EMPLOYEE MANAGER_ID HIRE_DATE RELIEVED_DATE

    --

    Thank you.

    You can try something like this given below to complete the historical table on update and delete.

    create or replace TRIGGER  "CLONE_EMP_UPDATE_DELETE"
    BEFORE DELETE OR UPDATE ON EMP
    FOR EACH ROW
    DECLARE
        PRAGMA autonomous_transaction;
    BEGIN
    INSERT INTO JOB_HISTORY("EMP_ID","EMP_NAME","DESIGNATION","TEAM_ID","TEAM_LEADER_ID","SUPERVISOR_ID","MANAGER_ID"
    ,"HIRE_DATE","RELIEVED_DATE")
      VALUES(:OLD.EMP_ID,:OLD.EMP_NAME,:OLD.DESIGNATION,:OLD.TEAM_ID,:OLD.TEAM_LEADER_ID,:OLD.SUPERVISOR_ID,
    :OLD.MANAGER_ID,:OLD.HIRE_DATE,
    :OLD.RELIEVED_DATE);
    COMMIT;
    END;
    

    Hope this helps you,

    Kind regards

    Jitendra

  • Update for Internet Explorer 8 Compatibility mode list for Windows Vista (KB982632) cannot install with the error details: Code 80070490 & also update for Windows Vista (KB981793) with the details of the error: Code 80070490

    I am running windows vista Home premium, on a system 32-bit HP Pavilion dv9700 op.  I have internet project 8 service pack 2 of windows and norton security suite installed on my computer.  I do not understand why these 2 updates keep do not install unless it didn't, but they are listed under important updates in the windows updates, can you please help me, maybe I don't have not enough memory on the left?

    Thank you!

    Windows Update error 80070490

    If you receive the Windows Update 80070490 error, it means that a file (CBS Manifest) that is needed to install updates is corrupt. To correct this problem, you will need to repairWindows. RepairingWindows will not damage your personal files or the programs that are installed on your computer.

    The System Update Readiness Tool for Windows can correct some conditions that causeWindows Update error 80070490. You can access and run this tool by reading this http://support.microsoft.com/kb/947821 on the Microsoft Web site.

    If the system update readiness tool solves the problem, you need to repairWindows. RepairingWindows will not damage your personal files or the programs that are installed on your computer.

    Once you have completed the repair, you will need to restart Windows Update to install updates are not included on the installation DVD. RepairWindows, follow these steps:

    1. Close all programs and restart your computer.

    2. Insert the DVD into your disc drive. Wait for the installer to start. If the installation program does not start automatically, follow these steps:

      1. Click on start and type Drive: \setup.exe in the search box. ReplaceDrive with the letter of the DVD drive of your computer (for example, D:\setup.exe).

      2. List programs, click Setup.exe.

    3. Click on install now.

    4. Click go online to get the latest updates for installation (recommended).

    5. If you are prompted to do this, type the Windows product key.

    6. What type of installation you want? window, click upgrade.

    7. Once the installation is complete, restart your computer, and then run Windows Update.

    If this post can help solve your problem, please click the 'Mark as answer"If you find it useful, mark it as useful by clicking the 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

Maybe you are looking for

  • Is it possible to enter/edit data "auto form fill"?

    AutoComplete data is editable?These days, you must complete all down to your inside leg measurement just to ask a simple question and she went from a nice to an essential characteristic.There are a lot of old data that could be deleted or updated day

  • Satellite A200-1ax: could not get the BT working on Win XP

    Hello I have a Toshiba laptop satellite a200-1ax. I installed Windows XP sp2.My problem is that I can't get the bluetooth work. I have installed a Toshiba bluetooth driver and nothing. When I try to install the bluetooth stack Toshiba the instalation

  • Total Annihilation version error

    Original title: the version of this file is not compatible with the version of windows for your doesn't work.  check the information on your computer to see if you need to x 86 (32 bit) or x 64 (64-bit) _ I am trying to run total annialation and he e

  • Audio drivers XP for G60-125NR

    I have a G60-125NR laptop and have recently passed my OS from Vista to XP Pro SP2 32-bit.  I found the drivers for everything except the sound work.  I tried 4 different driver Conexant High Definition SmartAudio 221 downloads and none of them work. 

  • Now remove the document folders in my office?

    I never knew/understood it was that libraries in Windows 7.  In my work as a transcriber I created documents word on my desktop in a folder with several subfolders for each customer.  I consider that I have word documents about 3,000 in all of these