Archives of the TeradataForum
Message Posted: Tue, 13 Oct 2015 @ 19:21:00 GMT
<-- Anonymously Posted: Tuesday, October 13, 2015 14:18 -->
I was wondering if anyone could give me a pointer in how to resolve this SQL problem.
I have a text string of a fixed length and I need to know when subsequent characters in the string change and in what order.
1st = 1 2nd = 2 3rd = 4 4th = 1
1st = 1
I was thinking of a solution where I transpose each character into a row with a corresponding sequence and then looking for the order of change using a window() function, however that would take multiple steps.
We are on Teradata V15.0.
Any suggestions appreciated.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|