Skip to content

Split String and Count Teradata SQL

I would like to split column ‘ASPCT_VLU_NM’ and count of occurrences of the timestamps in a given time frame. For example return the ID which have more than 3 occurrence in between 1537160520286 and 1537190520286. In the example below those are the timestamps : Answer If you are using Teradata 14 …

Get the last dates from multiple columns

This feels like it should be an easy one. How do I get the latest dates that are in different columns DROP TABLE #indebtedness CREATE TABLE #indebtedness (call_case CHAR(10), date1 DATETIME, date2 …