A collection of programs, tools, functions, scripts and source code snippets cohesively packaged to make the daily lives of those who work with the Teradata database easier in as many respects as possible.
This project currently contains the following items:
User Defined FunctionsORDERED_CONCAT()
Have you ever written a procedure or script that generates SQL, and wanted to generate an ordered list of columns? Did you end up writing an ugly FOR loop in Teradata SPL?
The ORDERED_CONCAT aggregate function will combine input values with a delimiter ordered by a value you specify. Try it out using a statement like this!
'SELECT ' ||
ORDERED_CONCAT(TRIM(ColumnName), ', ', ColumnID) ||
' FROM ' || TRIM(DatabaseName) || '.' || TRIM(TableName)
This set of functions will convert INTERVAL values into a total number of seconds. Useful for downstream calculations on the difference of two TIMESTAMP values:
StartTime (TITLE 'Start')
, FirstRespTime (TITLE 'Response')
, SECONDS(FirstRespTime - StartTime DAY TO SECOND) (TITLE 'Elapsed')
StartTime IS NOT NULL AND FirstRespTime IS NOT NULL
This view provides an easy-to-query list of all statistics that have been collected in your environment. Includes the last date and time statistics were collected, and the number of rows that the table / join index / hash index had at the time statistics were collected. Also shows all indexes that do not have statistics collected.
Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.