 |
 |
Archives of the TeradataForum
Message Posted: Tue, 06 Jun 2006 @ 09:47:54 GMT
Subj: | | To find the n th instance of a character in a string |
|
From: | | Mukkamala, Kotesh |
Is there a way to find the nth instance of a character in a string. Something like the INSTR function in Oracle.
I know the
index(substr(transaction_code,index(transaction_code,'&') +1) ,'&') +
index(transaction_code,'&')
can find the 2nd instance but what about the 3rd and 10th instance. The SQL can get pretty complex and un-developer friendly.
Regards,
Kotesh Mukkamala
Teradata Certified Master
| |