Home » Developer & Programmer » Forms » Package logic
Package logic [message #244373] Tue, 12 June 2007 08:39 Go to next message
srinivas.k2005
Messages: 342
Registered: August 2006
Senior Member
Hi,


I have requirement that once the number of rows inserted to a table is 99 then the new insert i.e, 100 should start updating the record from first record.
the table should allow only 99 records and the next records should go on updating from first.

Can i implement this with any easy way using any new built in .
i am working with a package which do the above.

Thanks,
Srinivas
Re: Package logic [message #244388 is a reply to message #244373] Tue, 12 June 2007 09:35 Go to previous message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

try out this logic

declare
row_number number;
begin
    select test_seq.nextval 
      into row_number 
      from dual;
    if row_number > 100 then
	update statement; 
	-- In where condition you have to use the primary key field compared with mod(row_number,100)
    else
    	insert statement;
    end if;
end;
Previous Topic: fields to be disabled whenever enterted from login form
Next Topic: Master detail form
Goto Forum:
  


Current Time: Fri Dec 09 07:48:03 CST 2016

Total time taken to generate the page: 0.14042 seconds