I need help making a timed trigger to update fees automaticly once a week

CREATE OR REPLACE TRIGGER set_fine AFTER UPDATE OF amountowed ON fines
DECLARE
BEGIN
:new.amountowed := (:new.amountowed) + sysdate + (((10/(24*60)));
END;
CREATE OR REPLACE TRIGGER set_fine
AFTER UPDATE OF fines ON amountowed
DECLARE
BEGIN
update amountowed += 10 WHEN sysdate == sysdate + (((10/(24*60)));
END;
I've never done triggers before and i don't get any errors when i try to create these but they don't work (I have to hit Ctrl+c), Is it syntax or structure that doesn't work? sysdate isnt a value i want to use the generic date used in oracle. In this example fees will be updated ever 10 minutes I found " sysdate + (((10/(24*60)));" in another forum I can't remember where exactly.
My tutor said my syntax is wrong and I need to fix it, any help?

Is it syntax or structure that doesn't work?yes ;)
Your syntax is wrong.
You want to update a certain value every ten minutes? Then the structure is also wrong. In this case you'll want a job (DBMS_JOB) which fires every ten minutes.

Similar Messages

  • I need help making Adobe Edge animation appear correctly on iphones, ipads and android phones.

    I need help making Adobe Edge animation appear correctly on iphones, ipads and android phones. It currently looks fine on desktops and androids. I am using wordpress with a responsive theme (Canvas). I will need you to document The url is http://adamhtc.org.s183459.gridserver.com.

    Thanks George, interesting thought.  I looked on Adobe's site and they "advertise" fillable forms for the iPhone and Android markets, but on the Windows Phone tab, that is mysteriously missing.  lol    Maybe it will come later?   Meanwhile, I'll google to see if there are any PDF viewers that can handle it now.   Thanks for the reply.  :-)

  • My grandma is a new apple user and she needs help making an apple account.

    my grandma is a new apple user and she needs help making an apple account.

    She should call Apple support or visit the Genius Bar at an Apple store (make an appointment first at http://apple.com/retail). They will walk her through the process.

  • I need help! i am trying to update iphoto on my macbook pro that i had bought from someone else. although i am signed into my account when trying to update it is asking me for the previous owners account details and it wont let me change it to my details

    i need help! i am trying to update iphoto on my macbook pro that i had bought from someone else. although i am signed into my account when trying to update it is asking me for the previous owners account details and it wont let me change it to my details how can i solve this problem please.
    thank you
    Jan Robinson

    That's because the Mac, OS X and the iLife apps that came preinstalled on the Mac all belong to the previous owner. The previous owner needs to call Apple care and have their Apple ID disassociated from the Mac. Then the hard drive needs to be totally erased and OS X and the iLife apps reinstalled using OS X Recovery.

  • HT1338 Need help locating where and how to update Mac OS-X 10.6.5 to the latest Mountain Lion Software...thanx John

    I need help locating where and how to update Mac OS-X to Mountain Lion.....Thanx....Jay

    First update your 10.6 version to 10.6.8 from the software update under the Apple Menu.
    This will add direct access to the Mac App store via a new application.
    Now launch the App Store from your Applications folder - Its the new icon a letter A formed from a ruler pencil and pen on a blue circle !
    Once launched you need to add your iTunes account details or create an account add payment details etc...
    Sign in purchase download and follow install processes to upgrade to 10.8 Mountain Lion.
    OH and to be safe BEFORE you install backup your current system to an external drive !

  • HT4623 i need help...did a FACEBOOK UPDATE on a iphone 3 and now facebook will not open. i realize the version os 4.3.1, but in settings their is no updates sections

    i need help i believe i did an update for facebook on a iphone 4.3.1, and now facebook will not open?

    You have updated the app to a version that is not compatible with your iphone.
    The iphone 3g can only go to 4.2.1
    You should check compatibiity before updating your apps.
    Sorry

  • Need help with INSTEAD OF trigger on view

    Hi,
    I am trying to use INSTEAD OF on a view because I will be updating the calling table in my trigger, which will cause mutation. 
    I need to update attribute7 of another record based on the new attribute7 of the current record (record being updated in the form).  Below is my script.  My problem is it does not perform the update. 
    create or replace view xxont_oe_order_lines_vw as select * from oe_order_lines_all;
    CREATE OR REPLACE TRIGGER APPS.xxont_sync_ard
    instead of insert or update on xxont_oe_order_lines_vw
    referencing
    new as new
    old as old
    for each row
    begin
       update oe_order_lines_all
           set attribute7 = :new.attribute7
       where attribute18 = to_char(:new.header_id)
          and attribute17 = to_char(:new.line_id)
          and flow_status_code <> 'CANCELLED' ;      
      /*exception
      when others then
         null ;
      end ;*/        
    end ;

    Always make your code developer friendly. Do extensive code instrumentation. At lease you can do this.
    create or replace trigger apps.xxont_sync_ard
    instead of insert or update on xxont_oe_order_lines_vw
    referencing
    new as new
    old as old
    for each row
    declare
       zero_update exception;
    begin
       update oe_order_lines_all
          set attribute7 = :new.attribute7
        where attribute18 = to_char(:new.header_id)
          and attribute17 = to_char(:new.line_id)
          and flow_status_code <> 'CANCELLED' ;
       if sql%rowcount = 0 then
         raise zero_update;
       end if;
    exception
      when zero_update then
         raise_application_error
               -20001
             , 'OE_ORDER_LINES_ALL: 0 rows updated attribute18 = "'
               || attribute18
               || '" attribute17 = "'
               || to_char(:new.line_id)
               || '"'
    end ;
    This will help you raise error when the update does not update any row. This is just an example, make sure if this is what your requirement wants if you want to implement it. If you don't want to raise error then you can just log it in a log table or log file.

  • Need Help in creating this trigger

    I need your help to create this trigger. I need to set the default fl in this table depending on various conditions:
    If there is only one indvl with end date as null then set the default_pk column for that indvl as 'Y'
    ELSE
    If there are multiple indvl_pks in this table with NULL end date then set the default_fl column to 'Y' for the indvl_pk with the earliest start date .
    ELSE if there are multiple indvls with same start date then set the dflt_fl to 'Y' with the minimum br_pk
    I am unable to get this to work due to the mutating trigger problem.
    For example in this one rows with emplt_pk with 1001 and 1003 will be set to 'Y'.
    create table emplt
    emplt_pk number,
    indvl_pk number,
    start_dt date,
    end_dt date,
    lct_fl char(1),
    sup_fl char(1),
    br_pk number,
    nro_pk number,
    default_fl
    char(1) default 'N' );
    INSERT
    INTO emplt
    values(1001, 101, to_date ('01-01-2005', 'MM-DD-YYYY' ), NULL, 'Y','N' ,123,NULL,NULL );
    INSERT INTO emplt values(
    1002, 101, to_date ('02-01-2005', 'MM-DD-YYYY' ), NULL, 'Y','N' ,NULL,0001,NULL );
    INSERT INTO emplt values(
    1003, 102, to_date ('02-01-2005', 'MM-DD-YYYY' ), NULL, 'Y','N' ,NULL,0001,NULL );
    Thanks in advance

    the Easy Tabs could be useful for your requirement
    http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Easy-Tabs-v5.aspx
    /blog
    twttr @esjord

  • I need help making a pie chart

    Hello, hoping for some help with making a chart that will update as i continually input data
    I have a chart that has many columns logging details of win/loss records. I would like to make a pie chart that represents a set of columns and shows the ratio of wins for each of the columns.
    I will try and give some better details. There are 5 columns (j,k,l,m,n) and each represents a color. In each column there are check-boxes. 1 or more will be checked on each row. On the same row there is a tally of wins. each row represents a different day. What I am looking for is a pie chart that shows how many wins i have in each color.
    for example.
    nov 1st: 5 wins in color J
    nov 2nd: 2 wins in color k
    nov 3rd: 4 wins in colors m and n
    the pie chart will contain a total of 15 'wins' split up on the chart between each color....... 5(j) + 2(k) + 4(m) + 4(n). theoretically the J should take up 1/3rd of the pie and so on.
    I also have a total at the bottom of the colors column, but this will not show which color got the wins.
    Hopefully this makes some sense to understand and if I am very fortunate someone much smarter then me will be generous enough to help me out.
    Thank you very much, all help is appreciated.

    Hi Anthony,
    This table may be  what you want. I added a row at the top (you don't need that row. It is just may way of getting around the poor screen shots in this forum).
    I hid some columns, then I copied the table and pasted directly into this reply (I have had it with screen shots ).
    A
    F
    J
    K
    L
    M
    N
    Date
    Wins
    Colour J
    Colour K
    Colour L
    Colour M
    Colour N
    Nov 1
    1
    TRUE
    Nov 2
    1
    TRUE
    Nov 3
    2
    TRUE
    TRUE
    Checkboxes show as TRUE (not a tick) in this pasted table. But a tick = TRUE .
    Formula in F3 (Wins, Nov 1)
    =COUNTIF(J3:N3,"=TRUE")
    I hope this helps with your pie chart.
    Regards,
    Ian.

  • Need Help making a Screencast for IPHONE

    Hello there
    I need some serious help making a screencast for a client - for it's Iphone Apps -
    something similare to this
    http://www.newsluxe.com/chaumet-et-iphone.php
    but more sexy, with a animated background and a different type of cursor.
    Anyideas ?
    I really don't know where to start - I found leads however :
    Camtasia Studio , screenflow, ,
    Maybe you could help me filling the gaps.
    Thanks for your help !

    does anyone know how apple made these forums?
    I think they use Jive:
    http://www.jivesoftware.com/products/forums/
    The Apple way for users to add photos is the .Mac web gallery:
    http://www.apple.com/ilife/iphoto/#webgallery

  • Need help making a simple script for my webcam

    Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
    I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
    tell application "CamTwist" to activate
    delay 10
    tell application "Photo Booth" to activate
    that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
    Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!

    Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
    tell application "System Events"
    tell application "CamTwist" to activate
    delay 0.5
    --Press command+b which is a user defined hot key to load webcam
    key code 11 using command down
    end tell
    delay 0.5
    tell application "Photo Booth" to activate
    My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone.

  • I need help making a square that scans across a screen.

    i'm trying to make a program that creates images of a square scanning across a black background.  so far all i have is a program that makes one image where i can alter the size of the square and its position.  I'm very very new to labview and i need help with the structure that would create all the images of the square scanning across and then shift down and scan across again.
    thank you very much,
    Joseph Sadler
    Attachments:
    Drawexample.vi ‏24 KB

    As Lynn found, there is a memory problem with the vi which didn't show up in my limited testing.
    Using Shift Registers with Picture Controls can cause problems.
    See this thread.
    Try the attached "mod" version.
    Then I got to thinking, why redraw the box (2x with "erase") - when you could just move a box around?
    (Note: I used a picture for the box, but you could use other objects.)
    The "mod1" version does it this way.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    squarescan mod.vi ‏20 KB
    squarescan mod 1.vi ‏20 KB

  • I need help making a new Arch install ISO

    I have posted a couple of messages, but as yet no one seems to have responded, probably because they have not read them.
    I need help building a new ISO for Arch, to take account of dmraid.
    I can and have built ones that get so far, and clearly I am not that far away.
    All I need help with now is getting at the contents of the initial ramdisk (/isolinux/initrd.img) so I can make a new one with modifications, and if anyone can help, I need a hand working out how to use the kernel26.img that I will end up with on a system.
    Any help appreaciated.

    As far as I know this will be included in the next ISO release. I solved it by manually bringing the dmraid package to the install and wrote a guide on installing your root system on dmraid. However when the system crashes I have the slight inconvenience of having to install dmraid and manually mount the sets to do a recovery. I guess this is the part you want to get rid of aswell. I decided to wait until the next holy ISO.

  • Help on Procedure and trigger for updating(urgent please)

    SQL> / Table A
    CTUT_ID CTUT_COMPANY_NAME CURRT_USER_ID FMIS_ID CREATE_DA UPDATE_BY UPDATE_DATE
    1234 A 15-APR-03
    2222 B 15-APR-03
    3333 C 15-APR-03
    4444 D 15-APR-03
    5555 E 15-APR-03
    6666 F 15-APR-03
    150282 G oRACLE 23-APR-03
    1 H 15-APR-03
    2 I 15-APR-03
    3 J 15-APR-03
    150343 K TIGER 24-APR-03
    150305 L EXAMPLE 23-APR-03
    150342 M SCOTT 24-APR-03
    sQL >/ Table B
    Empno     Empname UPDATE_BY UPDATE_DATE
    1 AA
    2 BB
    3 CC
    4 DD
    What i need to do is i need to create an update trigger on both tables
    like create a procedure
    1)In procedure i need to check like
    IF TABLEA.CURRT_USER_ID = (SELECT USER FROM DUAL)
    THEN
    UPDATE_BY = (CURRENT_USER_ID of CTUT_ID)
    FOR EXAMPLE CURRENT USER_ID IS SCOTT THEN
    UPDATE_BY = 150342
    UPDATE_DATE = SYSDATE
    ELSIF
    UPDATE_BY <=> (CURRENT_USER_ID of CTUT_ID)
    THEN
    MESSAGE('USER IS NOT IN TABLE);
    END IF;
    and call that procedure in the update triggers
    FOR BOTH TABLES TABLEA,TABLEB
    i CREATED A PROCEDURE BUT IT IS NOT WORKING
    ANY HELP PLEASE
    CREATE OR REPLACE PROCEDURE UPDATE(
    UPDATE_DATE out DATE,
    UPDATE_BY out VARCHAR2)
    IS
    Uuser varchar2(20);
    Udate date;
    Ufound number(1);
    BEGIN
    SELECT USER,SYSDATE
    INTO Uuser,Udate from dual;
    SELECT count(*),CTUT_ID into Ufound,Uctut_id
    FROM TABLEA
    WHERE CURRT_USER_ID = Uuser
    Group by Ctut_id;
    IF (UFOUND = 1) THEN
    UPDATE_DATE := UDATE;
    UPDATE_BY := UCTUT_ID;
    END IF;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-20001,'User Does not Exist');
    END UPD_CONSTITUENT;
    CREATE A TRIGGER :
    CREATE OR REPLACE TRIGGER TU
    BEFORE INSERT ON TABLEA
    FOR EACH ROW
    BEGIN      
    UPDATE(:NEW.update_date,
         :NEW.update_BY);
    END IF;      
    END;
    SQL> update TABLEA
    2 set CTUT_COMPANY_NAME = 'SCOTT TEST'
    3 WHERE FMIS_USER_ID = 'N';
    update TABLEA
    ERROR at line 1:
    ORA-04091: table TABLEA is mutating, trigger/function may not see it
    ORA-06512: at "UPDATE", line 12
    ORA-06512: at "TU", line 1
    ORA-04088: error during execution of trigger 'TU'

    Hi Mara,
    You are right thats what i want
    I have a table A
    EmpNo Empname Currtuser_id Update_date Updateby
    1 Denis Oracle
    2 Scott Scott
    3 Mara MMara
    1)what i need to do is when any user tries to update the table Table A
    Then the Trigger or procedure should check whether user is exits in table A in column currtuser_id
    If his user id exits in table A
    Then allow him to update the TABLE A
    and insert his EMPNO in UPDATE_BY
    and SYSDATE in UPDATE_BY
    He will do all this process using forms
    But i need to have trigger or procedure in database level for table
    2) I have another table like 10 tables
    Suppose TABLE B
    When user tries to update TABLE B
    Then the Trigger or procedure should check whether user is exits in table A in column currtuser_id
    If his user id exits in table A
    Then allow him to update the TABLE B
    and insert his EMPNO in UPDATE_BY
    and SYSDATE in UPDATE_BY
    3) I need to have a common Procedure and call that procedure in all tables in UPDATE TRIGGER
    Thanks for your help
    Thanks

  • HT1296 I am needing help to figure out how to update my itunes

    I need help. I have itunes on my computer and I have always been able to sync it with my phone and now it says I need to do an update on my itunes but not sure how... Please help

    You can run Apple Software Update, or you can download the iTunes installer from the iTunes tab above and run that installer.
    Regards.

Maybe you are looking for

  • Wow, a full Digitial Voice outage

    Nice that I tried to make a phone call when the emergency call from the school, that my son was ill, went to voice mail on my Verizon Wireless phone because service is so bad in Massapequa, Long Island, NY.  (I had just moved from Garden City, LI, wh

  • Why do I get high latency (300 ms) on a fast Mac, Firewire preamp, 16-sample buffer?

    Hardware: decent studio mic into Link.Firewire 4x6 (2518) preamp into early-2011 MacBook Pro (core i5), 8GB RAM. Software: Audition CS5.5, no other apps running, Core Audio driver selected (which is the only option). Only one mono track armed for rec

  • How to find the location of a particular font in the framemaker book?

    Hi All, please help me in finding the location of a particular type of font in the framemaker book. I was using the following procedure to find out earlier: Find > Character Format > (set the character format) > Search. Now I am unable to locate a pa

  • Forum problem witn BC

    I left several messages to technical support but never reply. I create a Forum with Business Catalyst. The site is created with Muse. The forum appear but i cannot create a new topic. I cannot go n the texte element. I dont undestand wy Thank you for

  • ODI vs rule file load

    Hi all, I would like to know the difference between loading data to essbase directly using rule files from a rdbms or flat file and loading it with the help of ODI. And using rule files in ODI interface to load data, what kind of performance and effi