04-06-22 04:39 AM
Answered! Go to Answer.
07-06-22 04:07 AM
SELECT BPAProcess.name,CONVERT(DECIMAL(38,12),Sum(
CONVERT(DECIMAL(38,12), IsNull(DataLength(BPASessionLog_NonUnicode.sessionnumber), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(stageid), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(stagename), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(stagetype), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(processname), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(pagename), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(objectname), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(actionname), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(result), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(resulttype), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(BPASessionLog_NonUnicode.startdatetime), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(BPASessionLog_NonUnicode.enddatetime), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(attributexml), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(automateworkingset), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(targetappname), 1))
+ CONVERT(DECIMAL(38,12), IsNull(DataLength(targetappworkingset), 1))
)/1073741824) AS session_log_size
From
BPASessionLog_NonUnicode INNER JOIN BPASession
ON BPASessionLog_NonUnicode.sessionnumber = BPASession.sessionnumber INNER JOIN BPAProcess
ON BPASession.processid = BPAProcess.processid
GROUP BY
BPAProcess.name
ORDER BY session_log_size DESC