Loading ...
Sorry, an error occurred while loading the content.

Oracle Doubt Please Help

Expand Messages
  • everfriends_2006
    Hi friends, I ve some doubts about records. It is as follows. I created a record and inserted values into it using the following steps. 1. type temp_table_rec
    Message 1 of 1 , Feb 13, 2007
    • 0 Attachment
      Hi friends,
      I've some doubts about records. It is as follows.
      I created a record and inserted values into it using the
      following steps.


      1. type temp_table_rec is record ( name Varchar2(20),
      id Number,
      sal Number,
      );

      type temp_table_tbl is table of temp_table_rec index by
      binary_integer;

      v_temp_table temp_table_tbl;


      2. Open cursor temp_table_cur for select
      last_name,employee_id,salary from employees;

      3. LOOP
      FETCH temp_table_cur INTO l_temp_table(v_count);
      v_count := v_count+1;
      EXIT WHEN temp_table_cur%NOTFOUND;
      END LOOP;

      Now The temp_table_rec contains arround 107 raws.

      My problem is as follows,

      a) I've to update a particular raw of the record.(I've to update
      the name to 'Smith' if the id=145).

      b) I've to delete a particular raw of the record.

      c) Is it possible to insert the values of this record into a table
      without using loop?

      Please help me to solve these
      problems.
      Thanks in advance and regards,
      Rajiv.
    Your message has been successfully submitted and would be delivered to recipients shortly.