2
Opa,
I am adding up the total of a double column, what I need is that, the query does not add up this column if the Cod column is equal. Explaining better, the Cod column can be repeated, if it is repeated the value of the discount column will also be repeated, that is, do not add the discount if you have another same Cod
Select sum(desconto) From ordem where cod != cod and data='2015-10-29'
What language are you using in the application? PHP?
– Amanda Lima
Here in the company still using VB6
– sNniffer
I don’t know VB, but I know how to solve your problem using logic with PHP. Would it help? Could you adapt?
– Amanda Lima
Please send, if direct change in sql will be better
– sNniffer