MySQL Forums
Forum List  »  German

Re: Daten in kommasepariertem Feld mit REPLACE richtig ersetzen
Posted by: Peter Brawley
Date: January 05, 2021 08:19PM

SQL is by design an incomplete language. For example the atomicity rule is fundamental. SQL is simply not designed to manipulate multi-valued data cells.

As I said, a complete language like PHP can easily massage a comma-separated list by turning it into an array, transform values as desired, then turn it back into a comma-separated string.

Something like the PHP can be done much more awkwardly in a MySQL stored procedure ... you would hand the string to a While loop, parse it comma by comma, transform the values as required, and thus prepare a replacement string. "Automatic"? No. But doable.

Meanwhile send a bottle of stale beer to the eejit who designed this aspect of your db.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Daten in kommasepariertem Feld mit REPLACE richtig ersetzen
30
January 05, 2021 08:19PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.