Friday, February 17, 2012

Display Number of Records Processed

I've got a stored procedure that processes a TON of records...

What I would liek to do is to write a row to a "progress" table which shows how many rows have actually been processed.

I have a simple counter defined in the procedure:

SET @.COUNTER = 0

Each time the procedure loops through, it increments by 1:

SET @.COUNTER = @.COUNTER + 1

What I would like to do is write rows to a PROCESS table which would reads:

PROCESSED 1000 rows

PROCESSED 2000 rows

PROCESSED ...... rows

etc.

I have a slight idea how to pull this off, but not sure about the whole even number thing by 1000.

If anyone has any insight it would be greatly appreciated!!

Thanks in advance!

Do this:

IF @.COUNTER % 1000 = 0

INSERT .......

|||

Works like a charm!!!

Thanks Tom...

No comments:

Post a Comment