Detecte when a row has been inserted a year ago

Hi!
I don't know if this is the right forum to ask this but I'll try. I have a table full of student data (including the date of row insertion) in an Oracle database and I'd like to know if it's possible to detect the rows that have been inserted a year ago. Do my servlet app have to poll the table constantly to know them ? Is there a better way to do this ?
thanks in advance

I don�t see the problem in using a servlet to start
and stop your timer task. You can start it in the init
method and stop it in the destroy method. This is the
approach taken to start / stop the popular Quartz
scheduler. This means that the TimerTask will only run
while your application is deployed which may or may
not be what you want.And what HTTP request is going to tell the servlet container to load the servlet and kick off the init() method?
I'm sure you could make it work, but I'm arguing that it's not how HTTP and servlets were meant to work, IMO. Better to have this be a job scheduled by the OS, IMO.
>
Quartz is a J2EE job scheduler
(http://www.opensymphony.com/quartz/) that has many
more features than TimerTask, it may be worth
considering if TimerTask is not sufficient for your
requirements.I'm sure TimerTask will work well enough if the precise start time isn't an issue.
I'd still say it doesn't belong in a servlet.

Similar Messages

  • Detecting when a control has been rendered in the UI

    Is there a way to detect (and react to) when a UI component has been rendered on a UI? I have a situation where I'm displaying a chart that I have given the ability to zoom and pan to (by means of an extended "container pane" class). For the zoom/pan capability to work, I need to turn off auto-ranging for the chart axes (zooming and panning are performed by adjusting the axis bounds). However, it would be useful to invoke the auto-ranging functionality when the chart is initially rendered so that the chart is "fitted" to the data. Then, once that is done, I would then turn off auto-ranging to allow the user to zoom and pan as they wish. I can't seem to find a method that works where auto-ranging is "on" and the chart is fitted to the data and then turned "off" so that zooming/panning works. I suspect that only when the chart is rendered on the UI does the auto-ranging come into play, hence my initial question.

    Couldn't you just set it to autorange initially like you said, then shut it off when you want to zoom/pan? Then you can do the call this
    http://docs.oracle.com/javafx/2/api/javafx/scene/chart/Axis.html#autoRangingProperty
    autoRanging
    public final BooleanProperty autoRangingProperty
    This is true when the axis determines its range from the data automatically
    See Also:
    isAutoRanging(), setAutoRanging(boolean)Figure out when you are or not then zoom/pan? or am I missing something here?
    Edited by: KonradZuse on May 8, 2013 5:26 PM

  • Querying a View Object after a Row has been inserted

    Hi All,
    I have a query as to whether something can be done or if I should be approaching my problem in a slightly different way.
    First an explanation of what I am trying to achieve:
    I have a header record that deals with a new user request. From one of the pages within the train one or more of several different ‘applications’ can be selected. When an ‘application’ is selected I am navigating to a new page, it queries the linesVO to see if any lines exist for that ‘application’, where they don’t it adds lines to the VO each representing ‘questions’ specific to that ‘application’. This works fine, however if I then come out of that page back into the train and then back into the same page specific for the same ‘application’ the initQuery is run and the lines I have just created are not found, it then tries to reinsert the question lines but will error as primary key validation fails. I do not want to commit after coming back from the lines page as the user has not specified a save, adding a save to the lines page would also cause the header to commit.
    Now the Question:
    Is there a way of ensuring that I can run my created method ‘initQuery’ which sets a where clause and calls ‘executeQuery’ will bring back lines that I have created in the VO and are held in cache? They must be held in cache else I would not be getting the error ‘Too many objects match the primary key’
    Any guidance on this matter would be most appreciated,
    Thanks
    Mike

    Unfortunately I do need to query the view again, each time the user clicks on a different ‘application’ in the train it will need to show only the lines in the view relating to that application. It is a bit like a master-detail except I want to show the detail lines on a separate page.
    I could have made each page separately but I am trying to make it dynamic so if a new application is added in the future I only have to add the details to the database tables.
    Thanks, Mike

  • Get the rows in the same order in which it has been inserted.

    Hi,
    I have a table with four columns(All varchars)...and there are no primary keys
    i have inserted 15 rows where col1="xyz"
    Now while retrieving the same...i dont get the same in the order i ahve inserted..
    What is the way to get the rows in the same order in which it has been inserted..?
    Regards

    I have a table with four columns(All varchars)...and
    there are no primary keys
    i have inserted 15 rows where col1="xyz"
    Now while retrieving the same...i dont get the same
    in the order i ahve inserted..
    What is the way to get the rows in the same order in
    which it has been inserted..?
    RegardsWhy? What is your business case behind this?
    In my experience an "order by" is used way too much without any real need to do it. Are your users interested to know in what order a few records from two years ago have been inserted? What about updates since that time?

  • How to show a row has been "removed" from a table

    We maintain rows in a table with a version number which will determine the current set of accounts for a version. I need to be able to show the changes between the versions - when a row was ADDED, REMOVED or there was NO CHANGE. I can work out ADDED and NO_CHANGE without any problem, but I'm not sure how I can determine that a row has been REMOVED when it no longer exists in the next version.
    I have provided an example piece of SQL below:
    with w_acct1 as
    (select 'A1' acct, 0 vers from dual
    union all
    select 'A2' acct, 0 vers from dual
    union all
    select 'A3' acct, 0 vers from dual
    union all
    select 'A1' acct, 1 vers from dual
    union all
    select 'A2' acct, 1 vers from dual
    union all
    select 'A1' acct, 2 vers from dual
    union all
    select 'A4' acct, 2 vers from dual)
    select a.*,
           nvl(lead(acct) over (partition by acct order by vers desc),'NULL') ld,
           case when lead(acct) over (partition by acct order by vers desc) is null then
                   'ADDED'
               when lead(acct) over (partition by acct order by vers desc) = acct then
                   'NO_CHANGE'
               else
                   'REMOVED'
               end add_remove
    from w_acct1 a
    order by vers,acctWhich gives me the following result:
    ACCT VERS LD ADD_REMOVE
    A1     0     NULL     NEW
    A2     0     NULL     NEW
    A3     0     NULL     NEW
    A1     1     A1     NO_CHANGE
    A2     1     A2     NO_CHANGE
    A1     2     A1     NO_CHANGE
    A4     2     NULL     NEW
    The result I want is:
    ACCT VERS LD ADD_REMOVE
    A1     0     NULL     NEW
    A2     0     NULL     NEW
    A3     0     NULL     NEW
    A1     1     A1     NO_CHANGE
    A2     1     A2     NO_CHANGE
    A3     1     NULL     REMOVED
    A1     2     A1     NO_CHANGE
    A2     2     NULL     REMOVED
    A4     2     NULL     NEW
    Note the REMOVED rows associated with the version even though they don't exist in the dataset for that version number.
    Can this be done with analytic functions or some other cool Oracle feature I'm missing?
    Regards
    Richard

    You can't know about a row being removed unless you have a record of that row somewhere, either as a copy of your old data (see example below) or you've recorded the information using delete triggers etc.
    SQL> ed
    Wrote file afiedt.buf
      1  with old_data as (select 1 as id, 'A' as dta from dual union all
      2                     select 2, 'B' from dual union all
      3                     select 3, 'C' from dual)
      4      ,new_data as (select 1 as id, 'A' as dta from dual union all
      5                    select 3, 'X' from dual union all
      6                    select 4, 'Y' from dual)
      7  --
      8      ,ins_upd as (select * from new_data minus select * from old_data)
      9      ,del_upd as (select * from old_data minus select * from new_data)
    10      ,upd as (select id from ins_upd intersect select id from del_upd)
    11      ,ins as (select id from ins_upd minus select id from upd)
    12      ,del as (select id from del_upd minus select id from upd)
    13  --
    14  select 'Inserted' as action, null as old_id, null as old_dta, new_data.id as new_id, new_data.dta as new_dta
    15  from new_data join ins on (ins.id = new_data.id)
    16  union all
    17  select 'Updated', old_data.id, old_data.dta, new_data.id, new_data.dta
    18  from old_data join new_data on (old_data.id = new_data.id)
    19                join upd on (upd.id = new_data.id)
    20  union all
    21  select 'Deleted', old_data.id as old_id, old_data.dta as old_dta, null as new_id, null as new_dta
    22  from old_data join del on (del.id = old_data.id)
    23  union all
    24  select 'No Change' as action, new_data.id as old_id, new_data.dta as old_dta, new_data.id as new_id, new_data.dta as new_dta
    25  from new_data where id not in (select id from ins_upd union all
    26*                                select id from del_upd)
    SQL> /
    ACTION        OLD_ID O     NEW_ID N
    Inserted                        4 Y
    Updated            3 C          3 X
    Deleted            2 B
    No Change          1 A          1 A
    SQL>

  • Can you programatically detect that a form has been called by another form?

    Can you programatically detect that a form has been called by another form using Open_Form?
    When closing a form I want to do one thing if it was opened stand-alone and another thing if it was called using Open_Form by another form.
    Thanks in advance.

    Maybe, Tony, also
    GET_APPLICATION_PROPERTY built-in ; it can
    be used to retrieve information about the calling (parent) and called
    form (child).
    The following example describes a way to perform a query on the child form
    using a value from the parent form; if the form is a child form, it first
    executes a query, otherwise the form goes into insert mode automatically.
              WHEN-NEW-FORM-INSTANCE
              ======================
              BEGIN
                   :GLOBAL.APP_NAME := GET_APPLICATION_PROPERTY(CALLING_FORM);
                   IF :GLOBAL.APP_NAME IS NOT NULL THEN
                        EXECUTE_QUERY;
                   END IF;
              END;Regards

  • How to identify which data has been inserted  to the table in specific date

    Hi,
    i created one table without data column.. i am inserting data in that table.
    i want which data has been inserted today..
    Please help.
    Thanks,

    If you are in Oracle 10g you can use ORA_ROWSCN.Note that unless the table was created with ROWDEPENDENCIES enabled, though, ORA_ROWSCN is tracked at the block level rather than the row level. So a block with one new row and many old rows could appear as having all been entered today.
    Justin

  • How to Know, No. of Rows has been Update, throught Triggers

    Hi all,
    I am having problem in after update trigger. I want to know How many rows has been updated by a sql statement, for that I have written on (AFTER UPDATE TRIGGER ON EMP). But it is not giving any result. I am executing Update statement from
    Sqlplus (UPDATE EMP SET SAL=23 WHERE EMPNO=7369;) We cant use Commit, and dbms_output.put_line in trigger. thats why I have used exception.
    CREATE OR REPLACE TRIGGER EMP_UPDATE AFTER UPDATE ON EMP
    DECLARE
    NO      NUMBER;
    NOROW      EXCEPTION;
    PRAGMA      EXCEPTION_INIT(NOROW, -20101);
    BEGIN
    NO:=SQL%ROWCOUNT;
    IF NO<>0 THEN
    RAISE_APPLICATION_ERROR(-20101,'Some Rows UPDATED');
    END IF;
    END;

    Hi Sachindra
    What SQL*Plus version you are using?
    Some versions that come with forms6i they dont write the number of rows updated, they just write operation 44 succeeded or something like that.
    But if you use the SQL*Plus database client (sqlplusw.exe or sqlplus.exe) which those 2 get installed with the db you will be able to see the number of rows update/deleted/inserted
    SQL> conn scott/tiger
    Connected.
    SQL> DESC EMP
    Name Null? Type
    EMPNO NOT NULL NUMBER(4)
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    SQL> UPDATE EMP SET SAL = 23 WHERE EMPNO = 7369;
    1 row updated.
    SQL>
    Hope this helps
    Regards
    Tony G.

  • "Unsupported CableCARD has been inserted" message

    The message "unsupported CableCARD has been inserted" appeared when I turned on my cable out of the blue. I've had this cable box for nearly 2 years now and have not done anything to it so how should I proceed? I have a Motorola box. Thanks!

    ljp123 wrote:
    What are my next steps after I have recieved a message indicating that an unsupported cablecard has been inserted when in fact that has not happened? Is there a problem with the xfinity cable box?
    Apologies for the issue and the experience that you described above. I have asked a colleague to review your account and reach out to you so that we can get any underlying issues identified and resolved.
    Is this happening on the Motorola DCX 3400 (DVR) or on one of the Pace RNG 110 cable boxes? 
    Thanks for your patience.

  • The hold button on my ipod touch 3rd generation does not work and ipod randomly flashes on and off, asking if i want to restart it when no button has been pushed, any suggestions?

    the hold button on my ipod touch 3rd generation does not work and ipod randomly flashes on and off, asking if i want to restart it when no button has been pushed, any suggestions?

    it might be a malfunction in your device. you might ave to send it to repairation
    1.ave you try resetting it or restoring it?
    2. did your hold boutons whas working beffor?

  • Is it possible to know the date & time, when a form has been last accessed?

    Hi
    I am using forms 6i. Is it possible to know when a form has been last accessed by any user?
    Regards

    Only if you implement such a feature. (Maybe writing to a table in the PRE-FORM-trigger in an autonomous transaction)

  • I don't understand the thing you call live bookmarks never used it, and most forums I have used notify VIA E-mail not giving out my E-mail address information when a reply has been made to the thread in question.

    So how do I get notified of updates in this forum? As I said: I don't understand the thing you call LIVE BOOKMARKS I have never used them, and most forums I have used notify VIA E-mail not giving out my E-mail address, or other private information when a reply has been made to the thread in question, so how do I get notified of updates in this forum? I have seen no normal options for setting my viewing preferences used for this forum. Thank You.

    Thanks for your reply via email/msg. He wrote:
    If you are interested in the actual design data for the Xeon processor, go to the Intel site and the actual CPU part numbers are:
    Xeon 4 core - E5.1620v2
    Xeon 6 core - E5.1650v2
    Xeon 8 core - E5.1680v2
    Xeon 12 core - E5.2697v2
    I read that the CPU is easy to swap out but am sure something goes wrong at a certain point - even if solderedon they make material to absorb the solder, making your work area VERY clean.
    My Question now is this, get an 8 core, then replace with 2 3.7 QUAD CHIPS, what would happen?
    I also noticed that the 8 core Mac Pro is 3.0 when in fact they do have a 3.4 8 core chip, so 2 =16? Or if correct, wouldn't you be able to replace a QUAD CHIP WITH THAT?  I;M SURE THEY ARE UO TO SOMETHING AS 1) WE HAVE SEEN NO AUDIO FPU OR PERHAPS I SHOULD CHECK OUT PC MAKERS WINDOWS machines for Sisoft Sandra "B-E-N-C-H-M-A-R-K-S" -
    SOMETHINGS UP AND AM SURE WE'LL ALL BE PLEASED, AS the mac pro      was announced Last year, barely made the December mark, then pushed to January, then February and now April.
    Would rather wait and have it done correct than released to early only to have it benchmarked in audio and found to be slower in a few areas- - - the logical part of my brain is wondering what else I would have to swap out as I am sure it would run, and fine for a while, then, poof....
    PEACE===AM SURE APPLE WILL BLOW US AWAY - they have to figure out how to increase the power for 150 watts or make the GPU work which in regard to FPU, I thought was NVIDIA?

  • How can I check how many times or when an app has been re-downloaded on my iphone

    How can I check how many times or when an app has been re-downloaded on my iphone. I know how to check purchases but I am looking for how to check when an app had been re-downloaded on my device whether it's through my device or Apple ID

    You mention "lack of control" several times.  The control is there - you control the Apple ID and password that owns the app.  No other Apple ID can use the app.  You have not shared your Apple ID or password with anyone, so you and only you own the app.
    Therefore, the number of times the app is downloaded or re-downloaded is completely irrelevant.  You might, for example, decide to purchase a new iPhone or iPad and download the app there.  Or the app developer may issue a new version which you download.  None of this matters regarding your "control" of the app.  All that matters is that you own it and nobody else can use it.

  • I am using a WD My Passport Studio external hard drive as a Time Machine. I get the error that a back up folder could not be created when my iMac has been asleep, any advice.

    I am using a WD My Passport Studio external hard drive as a Time Machine. I get the error that a back up folder could not be created when my iMac has been asleep, any advice. The hard drive is set set not to go to sleep.

    Were you not plugged in via USB to begin with?
    I would recommend performing some resets just to be on the safe side. Unplug the external HD, and try these steps:
    http://support.apple.com/kb/HT3964
    http://support.apple.com/kb/HT1379

  • Any existing function to validate an item when other item has been changed?

    Any existing function to validate an item when another item has been changed? Because these 2 fields are related. When one filed is changed, the other one should be blank and let the user to input again. I am using oracle custom.pll library.
    Any ideas?
    Amy

    Hi Vikram,
    Thanks for posting your issue,
    You can switch of alerts and set E-Mail Notification to Yes under your Workflow Tasks list > Settings > Advanced Settings. By doing so user specified in AssignedTo will receive e-mail notification when task is created and if task ownership is not changed
    during your workflow this will be the only mail sent by system.
    Since you are already using SharePoint designer you also have option to include Send an Email action in your workflow (after task is created). This option is better if you want to send some specific info to user.
    Also, browse the below mentioned URLs to create workflow step by step
    http://sharepointsolutions.com/sharepoint-help/blog/2010/03/create-a-detailed-custom-task-notification-with-a-sharepoint-designer-workflow/
    http://sharepoint-community.net/forum/topics/configure-email-notification-for-discussion-board-activity
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

Maybe you are looking for