I'm having a problem with a mysql query, i have a table which contains both the amount of an order (the first int in the table) and it's description. Unfortunately i cant change the database structure. I need to split these in a query, i have the following query;
Load table:
3 pallets 120 x 100 x 100
12 pallet 120 x 100 x 84
SELECT *,
IF (load * 1! = 0, LEFT (load, 1), '1 ') AS cargo_quantity,
IF (load * 1! = 0, SUBSTR (load, 2), load) AS cargo_description
FROM transport
The query works when the amount is below 10, when the number is 10 or higher the query will fall short. I could really use some help solving this problem, any suggestions?