Home » Developer & Programmer » Forms » counting the records fetched in data block for deleting purposes
counting the records fetched in data block for deleting purposes [message #124874] Tue, 21 June 2005 23:46 Go to next message
insomniius
Messages: 20
Registered: June 2005
Location: pakistan
Junior Member
i hve 2 blocks...from one blcok i an querrying the data in the other block...
how can i check the total number of records fetched in the data block...once i will get that i will run the for loop checking for every record that wheteher it is checked or unchecked...if its checked. will simply delete delete the record....
if there is n e other approach or script of doing wat i want to do...it is welcomed
regards
Re: counting the records fetched in data block for deleting purposes [message #124879 is a reply to message #124874] Wed, 22 June 2005 00:45 Go to previous messageGo to next message
arobinson98
Messages: 8
Registered: June 2005
Junior Member
I'd probably start by using the sql%rowcount and capturing the outcome in a variable. Then you could reference the variable from another block. Not sure if that helps or not.
Re: counting the records fetched in data block for deleting purposes [message #124892 is a reply to message #124879] Wed, 22 June 2005 02:30 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
If you are working with the data in your form block, then you can use 'system.last_record' to tell you when you have reached the end.

PROCEDURE LAST_RECORD_MESSAGE IS
BEGIN
IF :System.Last_Record = 'TRUE'
THEN Message('You are on the last row');
END IF;
END;


David
Previous Topic: Posting records in second form window
Next Topic: Pre-insert trigger
Goto Forum:
  


Current Time: Thu Sep 19 11:08:58 CDT 2024