|
Archives of the TeradataForumMessage Posted: Tue, 13 Oct 2015 @ 19:21:00 GMT
<-- Anonymously Posted: Tuesday, October 13, 2015 14:18 --> Hi, 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. For example, 111122244411 would return 1st = 1 2nd = 2 3rd = 4 4th = 1 and 11111111111 would return 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. thanks
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||