Question: Write an anonymous PL/SQL block that takes the contents of a text variable (e.g. VARCHAR2) and performs the following modifications to it: 1) Remove all
Write an anonymous PL/SQL block that takes the contents of a text variable (e.g. VARCHAR2) and performs the following modifications to it:
1) Remove all characters that are not a letter (e.g. A-Z or a-z) abcd123efg-^%. would be converted to abcdefg
2) Reverse the order of the remaining characters abcdefg would be converted to gfedcba
3) Capitalize every other letter starting with the 1st one gfedcba would be converted to GfEdCbA Display the original and converted contents in the variable as shown below. Original -> abc123efg-^%. Converted -> GfDcBa
Also, be sure to look at the built-in Oracle functions to see if something exists (e.g. SUBSTR(), LENGTH(), etc) before coding your solution.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
