ListRestart_Logon_Events Macro | SystemFE Macros | Teradata Vantage - 17.10 - ListRestart_Logon_Events - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SystemFE Macros

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Publication ID
English (United States)
REPLACE MACRO SystemFE.ListRestart_Logon_Events
 (Fromdate (date,               FORMAT 'YYYY-MM-DD'),
  Todate   (date, DEFAULT DATE, FORMAT 'YYYY-MM-DD')) AS
echo 'set defaults;';
echo 'set format on;';
echo 'set width 80;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 3,4;';
echo 'set omit on 1,2;';
echo 'set heading "&DATE||(Crashable/logon-enabled Events)||&TIME//Between &1 and &2";';
Select    :Fromdate      (Format 'YYYY-MM-DD')
        , :Todate        (Format 'YYYY-MM-DD')
        , TheDate        (Title  'Date')
        , TheTime        (Title  'Time')
        , Text           (Title  'Message Text')
From      DBC.Software_Event_Log
Where     TheDate between :fromdate and :todate
And       (Event_tag = 0331385500
           or  Event_tag = 0331389200
           or  (Event_tag = 340290000 AND text like '%logons are enabled%'))
Order By  TheDate, TheTime, Line;