'How can I update values in MySQL database table to conform to a different pattern?
I intend to clean some data in a MySQL database table for some data that was not properly captured. The table in question contains numerous columns but the column of interest is named id_number. Sample data in the column is captured as follows: BUT3345622019, PAC1034412016, etc. in that format. However, my requirement is to re-write each value in the column replacing it with values like BUT-3-3456-2/2019, PAC-1-0344-1/2016, etc. I have been thinking about the perfect SQL script (in MySQL) to solve the problem but so far I have not been successful. The table name is users. I am requesting for some help on this particular problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
