Personally, I know that my question may be silly ... But how can I pull data from a field only in SQL. Is that actually I'm putting together a report of the company's products ... There are products that drive it's value '1' but it when it's sold in Cash For example, it becomes '0.98', understand? I wanted to do a following, There is a product that Unit is worth '1' and it being sold per box is also worth '1', so I ignore ... But there is a product that the value of the unit is '1' sold in 'PT' or 'CX' (depending on the product) its value drops to '0.98' so I get this product 0.98 + Unit values that is '1' and if you have more sales unit like PT or DP package and display) picks up everything too, understand? I've done something more complex than that, but my head totally bugged, since yesterday thinking and nothing. thank you. My code looks like this:
SELECT
produto.cd_prod,
produto.descricao,
unid_prod.qtde_unid,
unid_prod.fator_preco,
unid_vda
FROM
produto,
unid_prod
WHERE
unid_prod.cd_prod = produto.cd_prod
AND unid_prod.fator_preco = '0.9800'
But in this case the query only pulls 0.9800 and ignores the rest of the Sales Units and I wanted it to be 0.9800 so it would bring the other units together. I'm new here, but thank you in advance.