I have two values in my code one is from a SQL Server query echo to the screen as formattedNum10d my second value is stored in a MySQL database and echo to the screen as formattedNum10f. In a seperate column i would like to subtract foramattedNum10f from formattedNum10d and echo the result but everything i have tried does not work any help would be greatly appreciated. $sql10d="SELECT SUM (CASE WHEN FFP.SINVOICE.NUM_0 Like '%SCR%' THEN (0 - (FFP.SINVOICE.AMTATIL_0 - FFP.SINVOICE.AMTTAX_0)) ELSE (FFP.SINVOICE.AMTATIL_0-FFP.SINVOICE.AMTTAX_0) END) FROM FFP.BPCUSTOMER, FFP.SINVOICE INNER JOIN FFP.SINVOICEV ON FFP.SINVOICE.NUM_0 = FFP.SINVOICEV.NUM_0 WHERE FFP.SINVOICEV.PJT_0='' AND FFP.SINVOICE.BPR_0 = FFP.BPCUSTOMER.BPCNUM_0 AND ((FFP.SINVOICE.ACCDAT_0>='$day01')) …

Member Avatar
+0 forum 0

The End.