CodeSnip: How to Add an Interval to a Time Stamp

November 29, 2008 – 9:00 pm

CodeSnip: How to Add an Interval to a Time Stamp Field Being Selected Through a Local Variable
The Teradata syntax does not allow any time interval (i.e. Hr/Min/Sec) to be selected through a local variable to be added to a Timestamp value. It only permits the exact interval literal being put through a pair of quotation marks. This creates some serious limitations where the interval to be added is used through a local variable for manipulation. The aim of this Code Snippet is to provide a workaround for the use of local variables. Deepankar provides a short description of the problem followed by the suggested solution with the help of the source code. He also provides a snapshot of the final output with relevant analysis.
Deepankar Sarangi

You must be logged in to post a comment.