I've got some really weird output from an sql query:

mysql> select concat('abcdef', license_code, 'c') from fulfillment_licenses_list limit 1;
| concat('abcdef', license_code, 'c') |
c    |ef06F1-DFD2-4425-83AF-A4EF
1 row in set (0.08 sec)

As you can see, it is missing the first 4 characters (abcd), while the 'c' that should be concatenated to the end is somehow pushed to before the start of the line. What could cause this?

More importantly, what can I do about it? How do I query this table in a way that produces meaningful, usable output, without the weird indentation? If I include any other columns, the output gets even more messed up until it is totally unintelligible.


You somehow managed to embed a carriage return (\r) into the data in your license_code field. You're going to need to clean up the data, and figure out what bug in the application introduced the carriage return.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.