15.10 - BynetEvents - Teradata Database

Teradata Database SystemFE Macros

prodname
Teradata Database
vrm_release
15.00
15.10
category
Administration
featnum
B035-1103-015K

BynetEvents

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;';
);