I have a MySQL table with approximately 10,000 records. In one field, the field_billingaddress_value, there is content like 1415 6th Ave N, 204. This is a set of values followed by a comma followed by a 3 or 4 digit number.
Some records do not have a comma or data following the set of values.
I need to have the comma and all data after the comma deleted from the field_billingaddress_value where it exists so the set of values before the comma are untouched. If there is no comma, the field is untouched.
In some cases, the data looks like 1585 Broadway, FL 10\n, in this case, the comma and everything after it should be removed.
The deliverable is to provide the SQL command or stored procedure which will check all records in this table and remove the comma and data after the comma when they exist. While I am providing the file for you to test with, I will run the deliverable on my server.
The data file is attached.