How to get the activity count in a stored Procedure

Database

How to get the activity count in a stored Procedure

Hello Everyone,

I am new to Teradata. I am using Teradata SQL Assistant .

I have a requirement where i have to capture the activity counts of each Insert/Update statements in a stored Procedure and store it in a Variable.

Could someone plz Help me with a small example. 

Thank you.

3 REPLIES

Re: How to get the activity count in a stored Procedure

Here is a sample procedure(script) of what i need. The below inset statement will insert 10 rows into the temp table. But i need that count 10 in the variable "ACT_CNT".

Could someone please modify the code to capture the result(ACT_CNT).

REPLACE PROCEDURE TEST_ACTIVITY_CNT

(

OUT act_cnt INT

)

BEGIN

INSERT INTO TEMP_TEST_STG_V360_RUN

SELECT * FROM STG_V360_RUN

;

END

;

Thank you.

Senior Apprentice

Re: How to get the activity count in a stored Procedure

SET act_cnt = ACTIVITY_COUNT;

Dieter

Re: How to get the activity count in a stored Procedure

Thank you.