how to get minimum item in a block- oracle form? what's wrong?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaforms
    New Member
    • Nov 2015
    • 1

    how to get minimum item in a block- oracle form? what's wrong?

    Code:
    declare 
    	v_purchase number; 
    begin
         	SELECT min(software.purchase_cost)
       		into v_purchase
          from hardware, software
          where :hardware.hw_serial_num = software.hw_serial_num;
          
          go_block('software');
          first_record;
         
          for i in 1..:system.last_record 
           loop
           	   go_record(i);
           if nvl(:software.purchase_cost,0) = v_purchase then
       
          exit;
            else 
            next_record;
    			end if;	 
          end loop;
          
     end;
    Last edited by Rabbit; Nov 6 '15, 06:03 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
Working...