How can I reverse a string using Teradata Stored Procedure Language (SPL) ? The requirement was to replicate the SQL-Server replace() function. This could be achieved by writing a corresponding UDF in Teradata but I want to achieve the same using a Procedure.
The procedure could be then used to initialize the variable before its use in the actual statement having reverse().
This can be achieved using he following Stored Procedure.
The main logic behind it is that in each iteration (number of iterations equal to the length of the string), we concatinate the last alphabet to a variable.