SQL REPLACE() function

SQL allows you to simply replace parts of a string by using REPLACE(fieldname, „replace-this“, „replace-with-this“) and yes you can encapsulate REPLACE() within other REPLACE(). Thats easy to use and efficient because you don’t need to order and sort your results in PHP or any other language, but directly get the correct format and order of your data.

Our table:

Our easy grouped Table:

Our table with the use of REPLACE():

An even better output:

And of course we need to order this:

Easy, fast and much better than using a second language to work with our SQL result.

 

Felix

 

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.