All Forums Database
Shiro 7 posts Joined 10/15
20 Jan 2016
ACTIVITY_COUNT of DBC.SysExecSQL

Hi All,
I want to use ACTIVITY_COUNT   with  DBC.SysExecSQL to get how many rows updated by the query executed in DBC.SysExecSQL.
Can anybody help me in this. 
 
Thanks 
 

Tags:
dnoeth 4628 posts Joined 11/04
21 Jan 2016

Simply use it:

   CALL dbc.sysexecsql(...);
   SET myVAr = ACTIVITY_COUNT;

Btw, better use Standard compliant EXECUTE IMMEDIATE instead of SysExecSQL.

Dieter

Shiro 7 posts Joined 10/15
21 Jan 2016

Thanks Dieter :)

Sniper_First 1 post Joined 01/13
23 Apr 2016

Hello ,
I did try above approach, but it seems to capture '0' always. My goal is to capture SP NAME, SQL and ACTIVITY_COUNT
I'm trying  below.

 

SET   strSQLCmd ='Delete   database.table' ; 

 

CALL DATABASE.sysexecsql(:strSQLCmd);

SET strActivityCount = ACTIVITY_COUNT; 

CALL DATABASE.CaptureQuery(strSQLCmd, strSPNAME,strActivityCount); 

 

Can someone please advise.

 

Thanks in advance !

You must sign in to leave a comment.