Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Select Tables created in a previous months only - response (2) by terankit

$
0
0
Thanks Ulrich. I have made a query as given below: SELECT DBNAME,                                                    TBLNAME,                                                       CAST(CREATTS AS DATE FORMAT 'YYYY-MM-DD')(CHAR(10))            AS CREATE_DATE                                                  FROM DBC.TABLES                                                        WHERE DBNAME    = 'DB1'                                       AND TBLKIND       = 'T'                                              AND CREATE_DATE >= ADD_MONTHS(DATE - EXTRACT(DAY FROM DATE) + 1, -1)   AND CREATE_DATE < (DATE - EXTRACT(DAY FROM DATE) + 1)                  ORDER BY 3,2;    If I want to make the changes as per your suggestion, then how should this query look like?   Thanks                                                 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>