Re: deleting records prior to entering a form
Date: 1997/06/12
Message-ID: <5npjng$38d_at_news.rl.af.mil>#1/1
>>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
I am not sure if this is exact code or typed code but....
>> DELETE FROM TEMP_TABLE WHERE TEMP_TABLE_ACTIVITY_DATE < TRUNC(TODAY);
there should be a dot here..----------------^
It may have an error and your system.message level is not only hiding the
commit but
also hiding the error message...
also the whole thing can be written..
DELETE FROM TEMP_TABLE WHERE TEMP_TABLE.ACTIVITY_DATE < SYSDATE;
dont even bother selcting sysdate from dual....
later mark... Received on Thu Jun 12 1997 - 00:00:00 CEST