Archives of the TeradataForum
Message Posted: Fri, 02 Jul 2004 @ 16:40:34 GMT
I don't think you can use a -ve number as outbounds. You can use the following SQL to SUBSTR backward.
select characters(trim('265CPI0')) Chrs, '265CPI0' Strng, 1 offset, substr(strng, (chrs - offset) , ( chrs - (chrs - (offset + 1)) ) ) ;
Incrementing the offset value will SUBSTR the string backward. May be you could use a derived table and CROSS JOIN it to automate the offset increment part.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|