1
Guys I have a certain problem if I make an appointment in the comic book, the SELECT
makes a calculation of some columns in the database and generates a new field with the name lucro
but if there is number with comma he ignores the comma and does not show in this new generated field, if someone gives me a light how to make him calculate the comma together I thank
code of consultation:
SELECT ID_Pacote,produto.Nome,
peca,FK_ID_Produto,Quantidade,Data_entrada,Data_saida
,CONCAT(ROUND(pacote.Quantidade * produto.Preco ), ' R$ ')
AS 'Lucro' FROM Pacote INNER JOIN Produto on pacote.FK_ID_Produto =
produto.ID_Produto
It worked, thanks, I learned to do it the wrong way, thanks for the tip
– Pietro Nunciaroni
Opa, that’s great... Don’t forget to mark as the correct answer, because other people can go through the same problem and already find the solution.. :)
– Filipe L. Constante
Marco yes, only need to wait 5 min to mark sksk
– Pietro Nunciaroni
face me a doubt, I wanted to put the
R$
before the value, any suggestions ?– Pietro Nunciaroni
Uses Concat(), type CONCAT('R$ ', '10,00'); Likes: https://www.w3schools.com/sql/func_mysql_concat.asp
– Filipe L. Constante
Valeu Man :)...
– Pietro Nunciaroni