BTEQ Script Listing for BynetEvents Macro | SystemFE Macros | Teradata Vantage - 17.10 - BynetEvents - 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.BynetEvents
 (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 254;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set omit on 1,2;';
echo 'set suppress on 3,4;';
echo 'set heading "&DATE      BYNET Events Between &1 and &2      &TIME|| ||";';
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   ((Event_tag>=0331110000 AND Event_tag<=0331112100)
         OR (Event_tag >= 0331290000 AND Event_tag <= 0331297800)
         OR (Event_tag >= 0331300000 AND Event_tag <= 0331302100)
         OR (Text like '%bynet%'))
And     TheDate BETWEEN :fromdate AND :Todate
Order by TheDate, TheTime, Line;
echo 'set defaults;';