Home » SQL & PL/SQL » SQL & PL/SQL » Any method for deleting record data ? (Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production)
icon6.gif  Any method for deleting record data ? [message #331089] Wed, 02 July 2008 05:20 Go to next message
NewLife
Messages: 170
Registered: April 2008
Senior Member
I have declared a record and a table of that record.

    TYPE rec IS RECORD ( proj   AV_ACTIVITY.proj%TYPE,
                         act    AV_ACTIVITY.act%TYPE );

    TYPE object_table_type is TABLE OF rec INDEX BY BINARY_INTEGER;
    temp_ass_rn object_table_type;


Is there any method available in which we can delete all the data in the "object_table_type" like we have COUNT for Counting the records ?

Example for count is given below.

for c1_rec in (    select distinct PROJECT_NAME , ACTIVITY_NAME
                    from adm.dup_memo_project
                    where act_res_status = 'ASSIGNED'
                    order by project_name , activity_name
                )
            loop
                        v_cnt_temp_ass_rn                   := 1 + temp_ass_rn.count;
                        temp_ass_rn(v_cnt_temp_ass_rn).proj := c1_rec.project_name;
                        temp_ass_rn(v_cnt_temp_ass_rn).act  := c1_rec.activity_name;

            end loop;

dbms_output.put_line(temp_ass_rn.count);


i want to delete all data in this "temp_ass_rn" before i do this assignment

                        temp_ass_rn(v_cnt_temp_ass_rn).proj := c1_rec.project_name;
                        temp_ass_rn(v_cnt_temp_ass_rn).act  := c1_rec.activity_name;

[Updated on: Wed, 02 July 2008 05:21]

Report message to a moderator

Re: Any method for deleting record data ? [message #331095 is a reply to message #331089] Wed, 02 July 2008 05:29 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

Hi

use Table.delete - delete all records
Table.delete[n] - delete the nth element
Table.delete[m,n] - delete from m to nth element



kanish
Re: Any method for deleting record data ? [message #331121 is a reply to message #331095] Wed, 02 July 2008 05:57 Go to previous message
NewLife
Messages: 170
Registered: April 2008
Senior Member
Thanks buddy, I am implememnting the same, hope it works
Previous Topic: Blob Column
Next Topic: Array Searching Logic
Goto Forum:
  


Current Time: Sun Feb 09 09:53:31 CST 2025