teradeta sql

Training
Enthusiast

teradeta sql

Can we store the start time , end time & number of rows affected by a SQL  into another table in teradata, Can any one help in this ?

Tags (1)
2 REPLIES
Senior Apprentice

Re: teradeta sql

Hi Henry,

you mean within a script in (based on your tags) BTEQ?

There's ACTIVITYCOUNT, but you can't use it outside of .IF ACTIVITYCOUNT  :-(

Possible solutions:

- write a NOTIFY exit in C and use it before the SQL statement (check the BTEQ manual for details)

- wrap it in a SP

Or simply use DBQL for it (which is probably enabled on your system), there's only one drawback: DBQL is cached, to be able to run this insert within your script you need to ".HANG 600" seconds (or whatever is used on your system for flushing it).

Or set a QueryBand to easily identify the job(s) and then extract the info from dbc.QryLogV a while after the script(s) finished.

Dieter

Senior Apprentice

Re: teradeta sql

Btw,

would you three guys HenryMiguel, ANANDEKBOTE and ManishNayek (if they're actually different people) please stop posting new threads, just to answer them each other promoting the same training institute you're probably working for.

Dieter