Run Class method under HSCUSTOM on terminal
Hi All,
I have a method like this and I want to be able to see the results on the terminal, how do I run this method on a terminal to display the results of this SQL query?
{
set oldNamespace = $Namespace
new $Namespace
set $Namespace = namespace
s timeTaken = 0, InDate = ""
#SQLCompile Select=Display
&SQL(select InDate, AVG(Time_Taken) into :InDate, :timeTaken from (select SessionId, (TimeCreated) InDate, MIN(TimeCreated) Start_Time,MAX(TimeProcessed) End_Time, DATEDIFF('ms',MIN(TimeCreated),MAX(TimeProcessed)) Time_Taken FROM Ens.MessageHeader where status = 'Completed' and Resent is null and Month(TimeCreated) = Month(current_date) group by SessionId) group by Year(InDate), Month(InDate)) new $Namespace
set $Namespace = oldNamespace
do ..SetSensor("ResponseTimeCurrentMonth",timeTaken,namespace)
}