I need to complete the amount of numbers to display on the screen, what would that be. the quantity that would be an example: 20 need to enter 15 characters with 0,
Example: 000000000000020 .
A friend of mine showed me in Excel a way he uses the CONCAT and then only takes the last 15 numbers, so the id can be 1,100,100 etc ... that it will always be 15 numbers that would be the zeros plus the quantity.
I looked here on the site and also on the internet but could not do what I need, someone would have a tip.
This result I bring from MySQL, if it is easier on MySQL I can use it as well.
Here is an example of the query I tried to do:
SELECT
MAX(cup_id) AS CUPOM,
MAX(DATE_FORMAT(c.cup_data_hora, '%d/%m/%Y')) AS DATA,
MAX(c.cup_data_hora) AS HORA,
MAX(l.loja_num) AS LOJA_NUM,
MAX(l.loja_desc) AS LOJA_NOME,
MAX(l.loja_end) AS END_LOJA,
MAX(u.usu_cod) AS USU_ID,
MAX(u.usu_nome) AS USU_NOME,
MAX(v.vas_cod_emporium) AS COD_EMPORIUM,
MAX( v.vas_desc) AS VASILHAME,
MAX(c.cup_quantidade) AS QUANTIDADE,
CONCAT(c.cup_quantidade,'000000000000') AS QUANTIDADE_15
FROM cupom AS c
LEFT JOIN loja AS l ON c.cup_loja = l.loja_num
LEFT JOIN vasilhame AS v ON c.cup_vasilhame = v.vas_id
LEFT JOIN usuarios AS u ON c.cup_usu_id = u.usu_cod
WHERE cup_loja =4**