Skip to content

Tag: teradata

Teradata REPLICATE function?

I’m converting MS SQL Server codes to Teradata. I found out that Teradata has no replicate function. Below is the sample code Is there an alternative function for replicate in Teradata? Thanks Answer Try this: This will repeat the character ‘0’ two minus the length of the column, which is ef…

Teradata SQL Same Day Prior Year in same Week

Need help figuring out how to determine if the date is the same ‘day’ as today in teradata. IE, today 12/1/15 Tuesday, same day last year was actually 12/2/2014 Tuesday. I tried using current_date – INTERVAL’1’Year but it returns 12/1/2014. Answer You can do this with a bit of ma…