Re: deleting records prior to entering a form

From: Jason Dix <jaosn_at_waikato.ac.nz>
Date: 1997/06/06
Message-ID: <33977882.8346862_at_news.waikato.ac.nz>#1/1


On Tue, 03 Jun 1997 23:55:50 GMT, wgweis_at_ucdavis.edu (george) wrote:

>Hi:
>
>I have this problem I hope someone out there can help me with. I am
>using a temporary table to store text lines for a student transcript.
>Each record in the table is one line of text. Before entering the
>form displaying the transcript, however, I'd like to clean up this
>table by deleting any records which were not created on the actual day
>the form is being run. I wrote the following code in a trigger called
>by WHEN-NEW-FORM-INSTANCE:
>
>/*
> * New trigger: delete old transcript_temp records.
> */
>DECLARE
> TODAY DATE;
>BEGIN
> SELECT SYSDATE INTO TODAY FROM DUAL;
>
> DELETE FROM TEMP_TABLE WHERE TEMP_TABLE_ACTIVITY_DATE <
>TRUNC(TODAY);
>
>-- suppress commit message.
> :SYSTEM.MESSAGE_LEVEL := 15;
 COMMIT_FORM;
> :SYSTEM.MESSAGE_LEVEL := 0;
>END;
>
>The problem is, the records don't get deleted. It is as if I need to
>commit somewhere and the form is not committing. I tried 'COMMIT'
>instead of 'COMMIT_FORM' with no results. MS Access has something
>called a delete query. How can I do the same thing in Oracle?
>
>George
>
>
There is no reason this shoud'nt work!
Put a Message in the trigger and look at the value of today see it is what your expecting or remove the where clause and try it again.

Jas Received on Fri Jun 06 1997 - 00:00:00 CEST

Original text of this message