BTEQ Script Listing for NoFallBack_DB Macro | SystemFE Macros | Teradata Vantage - 17.00 - 17.05 - NoFallBack_DB - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SystemFE Macros

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Release Date
June 2020
Content Type
Administration
Publication ID
B035-1103-170K
Language
English (United States)
REPLACE MACRO SystemFE.NoFallBack_DB (DBName (Char(30))) 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 1;';
echo 'set heading "&DATE||NoFallBack Tables In Database &1||&TIME";';
Select    DBC.AllSpace.DataBaseName
          (Title 'DataBase', Format 'X(30)')
        , DBC.AllSpace.TableName        (Title 'Table')
        , Sum(CurrentPerm)  (Title 'Bytes')
From      DBC.AllSpace, DBC.Tables
Where     DBC.AllSpace.Databasename = :DBName
And       DBC.Allspace.Databasename = DBC.Tables.Databasename
And       DBC.Allspace.Tablename    = DBC.Tables.Tablename
And       DBC.Tables.ProtectionType = 'N'
Order By  1,2
Group By  1,2;
echo 'set defaults;';
);