replace 3rd and 9th Position In string

Database

replace 3rd and 9th Position In string

Greetings,

I have string (varchar) and I am looking to replace 3rd and 9th position of the string with ‘$’ and ‘#’, on Microsoft SQL Server STUFF function will perform string replacement. Do we have any equivalent functions on Teradata? I gave a try with oreplace,  but it is not handy to identify string postions and substring aslo not helpful.

Example:

Actual string value   = AAABXCYY  

Expected string value =AA$BXXCY#

Best

EP

1 REPLY

Re: replace 3rd and 9th Position In string

Greetings,

I have string (varchar) and I am looking to replace 3rd and 9th position of the string with ‘$’ and ‘#’, on Microsoft SQL Server STUFF function will perform string replacement. Do we have any equivalent functions on Teradata? I gave a try with oreplace,  but it is not handy to identify string postions and substring aslo not helpful.

Example:

Actual string value   = AAABXXCYY  

Expected string value =AA$BXXCY#

 

Best

EP