Forked from emaillenin/columns_accessed_recently.sql
Created
October 15, 2016 13:53
-
-
Save hibellm/d0069943eda0065247ae085e55741011 to your computer and use it in GitHub Desktop.
Finds the columns that has been recently accessed in Teradata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select ObjectColumnName from dbc.dbqlobjtbl a | |
join dbc.dbqlogtbl b on a.ProcID = b.ProcID | |
and a.QueryID = b.QueryID | |
where ObjectDatabaseName = 'database_name' and ObjectTableName = 'table_name' and statementtype = 'Select' and ObjectType = 'Col' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment