<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Null Value In Termination Reason from SQL Query in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67214#M19819</link>
    <description>&lt;P&gt;Hi Mradul,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try joining the SessionInfo table on the SessionLog table. I would caution that running this query in a dashboard as a live connection to the production database will have unintended consequences to the Blue Prism application. If this query is intended to just pull a report, then ensure that you run it during off hours. The number of rows and data that the SessionLog table can contain is massive.&amp;nbsp; Often times the Exception if it is an internal Exception will appear in the result of the session log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;SELECT&lt;BR /&gt;si.processname&lt;BR /&gt;,format(si.startdatetime,'yyyy-MM-dd HH:mm:ss') as starttime&lt;BR /&gt;,isnull(format(si.enddatetime, 'yyyy-MM-dd HH:mm:ss'),'running') as endtime&lt;BR /&gt;,si.runningresourcename&lt;BR /&gt;,case when si.statusid = 2 then 'Terminated'end as 'Status'&lt;BR /&gt;,si.sessionnumber&lt;BR /&gt;,si.lastupdated&lt;BR /&gt;,si.laststage&lt;BR /&gt;,si.exceptionmessage&lt;BR /&gt;,sl.result&lt;BR /&gt;,sl.exceptionmessage&lt;BR /&gt;FROM [BluePrism].[dbo].[BPVSessionInfo] si&lt;BR /&gt;JOIN [BluePrism].[dbo].[BPVSessionLog_NonUnicode] sl&lt;BR /&gt;ON si.sessionnumber = sl.sessionnumber&lt;BR /&gt;where si.statusid = 2 and cast(si.startdatetime as date) = DATEADD(DAY, -1, cast(getdate() as date)) order by processname&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Christopher Potvin &lt;BR /&gt;Senior RPA Developer&lt;BR /&gt;SS&amp;amp;C Blue Prism&lt;BR /&gt;Canada&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 13 Oct 2023 14:50:00 GMT</pubDate>
    <dc:creator>chrispotvin</dc:creator>
    <dc:date>2023-10-13T14:50:00Z</dc:date>
    <item>
      <title>Null Value In Termination Reason from SQL Query</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67213#M19818</link>
      <description>&lt;P&gt;Dear Expert,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I am trying to get the 'Terminated Data' from BluePrism with ExceptionMessage using SQL Query but, I am getting 'Null' and 'Unexpected Termination of Session' in ExceptionMessage Column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before is the Query I have used.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SELECT&lt;BR /&gt;si.processname&lt;BR /&gt;,format(si.startdatetime,'yyyy-MM-dd HH:mm:ss') as starttime&lt;BR /&gt;,isnull(format(si.enddatetime, 'yyyy-MM-dd HH:mm:ss'),'running') as endtime&lt;BR /&gt;,si.runningresourcename&lt;BR /&gt;,case when si.statusid = 2 then 'Terminated'end as 'Status'&lt;BR /&gt;,si.sessionnumber&lt;BR /&gt;,si.lastupdated&lt;BR /&gt;,si.laststage&lt;BR /&gt;,si.exceptionmessage&lt;BR /&gt;FROM [BluePrism].[dbo].[BPVSessionInfo] si&lt;BR /&gt;where si.statusid = 2 and cast(si.startdatetime as date) = DATEADD(DAY, -1, cast(getdate() as date)) order by processname&lt;/P&gt;
&lt;P&gt;Can anyone help why I am getting 'Null' Value in exception message or any other query Should I try ?&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Mradul Agrawal&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Oct 2023 09:46:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67213#M19818</guid>
      <dc:creator>mradul.agrawal</dc:creator>
      <dc:date>2023-10-13T09:46:00Z</dc:date>
    </item>
    <item>
      <title>RE: Null Value In Termination Reason from SQL Query</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67214#M19819</link>
      <description>&lt;P&gt;Hi Mradul,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try joining the SessionInfo table on the SessionLog table. I would caution that running this query in a dashboard as a live connection to the production database will have unintended consequences to the Blue Prism application. If this query is intended to just pull a report, then ensure that you run it during off hours. The number of rows and data that the SessionLog table can contain is massive.&amp;nbsp; Often times the Exception if it is an internal Exception will appear in the result of the session log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;SELECT&lt;BR /&gt;si.processname&lt;BR /&gt;,format(si.startdatetime,'yyyy-MM-dd HH:mm:ss') as starttime&lt;BR /&gt;,isnull(format(si.enddatetime, 'yyyy-MM-dd HH:mm:ss'),'running') as endtime&lt;BR /&gt;,si.runningresourcename&lt;BR /&gt;,case when si.statusid = 2 then 'Terminated'end as 'Status'&lt;BR /&gt;,si.sessionnumber&lt;BR /&gt;,si.lastupdated&lt;BR /&gt;,si.laststage&lt;BR /&gt;,si.exceptionmessage&lt;BR /&gt;,sl.result&lt;BR /&gt;,sl.exceptionmessage&lt;BR /&gt;FROM [BluePrism].[dbo].[BPVSessionInfo] si&lt;BR /&gt;JOIN [BluePrism].[dbo].[BPVSessionLog_NonUnicode] sl&lt;BR /&gt;ON si.sessionnumber = sl.sessionnumber&lt;BR /&gt;where si.statusid = 2 and cast(si.startdatetime as date) = DATEADD(DAY, -1, cast(getdate() as date)) order by processname&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Christopher Potvin &lt;BR /&gt;Senior RPA Developer&lt;BR /&gt;SS&amp;amp;C Blue Prism&lt;BR /&gt;Canada&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Oct 2023 14:50:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67214#M19819</guid>
      <dc:creator>chrispotvin</dc:creator>
      <dc:date>2023-10-13T14:50:00Z</dc:date>
    </item>
    <item>
      <title>RE: Null Value In Termination Reason from SQL Query</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67215#M19820</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;Thanks for your suggestion&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I tried to execute the Query using JOIN from SessionLogs But, I got Invalid Column Error .&lt;/P&gt;
&lt;P&gt;"Msg 207, Level 16, State 1, Line 12&lt;BR /&gt;Invalid column name 'exceptionmessage'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked the Database for 'BPASessionlog_NonUnicode and there is no column assigned with ''exceptionmessage'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I remove the Syntax [,sl.exceptionmessage], I am able to execute query but, Again I am getting 'NULL' value in Result Column and Exceptionmessage.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to check the entire data from BPASession and I noticed that there also I am getting 'NULL' value in ExceptionType, Exceptionmessage, Result.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Mradul Agrawal&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Oct 2023 18:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Null-Value-In-Termination-Reason-from-SQL-Query/m-p/67215#M19820</guid>
      <dc:creator>mradul.agrawal</dc:creator>
      <dc:date>2023-10-13T18:01:00Z</dc:date>
    </item>
  </channel>
</rss>

