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

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.

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

try out this logic

row_number number;
    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)
    	insert statement;
    end if;
Previous Topic: Login form
Next Topic: built-in callendar
Goto Forum:

Current Time: Sun Aug 20 10:37:09 CDT 2017

Total time taken to generate the page: 0.04202 seconds