Home » Developer & Programmer » Forms » very important for me. help please
very important for me. help please [message #86917] Fri, 19 November 2004 19:22
odeveloper
Messages: 34
Registered: September 2004
Member
hi all gurus!

i created a form in 10g with multi record blocks. one block is base table and another is non-base table. i made this procedure to fill non-base table block from base-table block but is generating error while compiling it on -- enames my_varchar2 := my_varchar2(null) -- i already created TYPE in db for my_varchar2 and it was successfully created. can you help me to do this as i want SORTED data from un-sorted (as see i used order by to sort).

thanks in advance.

PLEASE NOTE THAT THIS IS WORKING IN SQL*PLUS ENVIRONMENT.

my code is:

PROCEDURE fill_values IS
   enames my_varchar2 := my_varchar2(null);
   total_records number;
   ndx number:=1;
begin
 last_record;
 total_records := :system.cursor_record;
 first_record;
 for i in 1..total_records
 Loop
    enames.extend;
    enames(ndx) := :emp.ename;
    if to_number(:system.cursor_record) = total_records then
       exit;
    else
       ndx:=ndx+1;
       next_record;
    end if;
 End Loop;
 go_block('TEMP');
 ndx:=1;
 for r in (select column_value val from table(enames) order by 1)
 Loop
    if r.enames is not null then
       :TEMP.m_empname := r.enames;
       ndx:=ndx+1;
    end if;
    if to_number(:system.cursor_record) = total_records then
       exit;
    else
       next_record;
    end if;
 End Loop;
END;

 
Previous Topic: oracle forms
Next Topic: Re : Data Parameter
Goto Forum:
  


Current Time: Sun Jun 02 13:56:07 CDT 2024