|
|
Archives of the TeradataForum
Message Posted: Mon, 30 Apr 2012 @ 18:03:41 GMT
Subj: | | Re: Extracting a String From End |
|
From: | | Dieter Noeth |
Dave Wellman wrote:
| I don't think you can reaslitically do this using just SQL. I think you'll have to use a UDF, effectively you want an REVERSE-SUBSTRING
function, i.e. looking for the first position of char#1 when searching char#2 in reverse. You might want to check the existing Teradata UDF's to
see if there is something similar. If not, then get coding! | |
One of the Oracle UDFs is INSTR, which can be used for searching backwards and searching for the 1st/2nd/3rd/etc. occurence.
It's included in TD14 ;-)
Dieter
| |