Hi ,
I have the following requirement.
I have a lookup table as follows:
Source Format | Fix Format |
9999XXX | 9-99-9XXX |
9999X | 9-9-99X |
9XXXX-X | 9X-XXXXX |
I need to convert the source data coming in according to the Fix Format.
I am able to match in the Source format with the Source format Column till now,the next step would be Convert it into the Fix Format and I need to do it dynamically.
E.g. If the Source data is 9876C is conveted to 9-8-76C
and 1ASDFG-Z is converted to 1A-SDFGZ
We can do substr() for each pattern but I need some logic that the process is automated and I do not have to hardcode substr for each and every pattern.
Do let me if you have some Idea.