Microsoft
Software
Hardware
Network
Question : Mysql CASE HELP - MARGIN CALC
Hi i have this sum
round((sum((h.unitsell * h.quantity) - h.bulkdiscount)/1.1 - sum(h.unitcostex)) / (sum((h.unitsell * h.quantity) - h.bulkdiscount)/1.1) * 100,2) as MARGIN,
I need it in a case when statement
when h.subtranstype <'4' then...
I cant get it with out error
Heres my try
sum(case when h.subtranstype < '4' then (((h.unitsell * h.quantity) - h.bulkdiscount)/1.1 - (h.unitcostex)) / (sum((h.unitsell * h.quantity) - h.bulkdiscount)/1.1) * 100) else 0 end) as MARGIN,
CAn anyone help me out, I can't get the (BRACKETS) right
THanks
Answer : Mysql CASE HELP - MARGIN CALC
Round(sum(case when h.subtranstype < '4' then
(
(
(
(h.unitsell * h.quantity
)
- h.bulkdiscount
)/1.1
) - h.unitcostex
) /
(
(
(h.unitsell * h.quantity
)
- h.bulkdiscount
) /1.1
)
Else 0 end
) * 100.00 , 2) as Margin
Random Solutions
Virtual Data Recovery Error
A critical function required for the transfer of delivery of the message was not supported by the originator of the report
run excel and run the enable auto refresh
Kernel panic not syncing VMWare Data Recovery 1.2
How can I sign certificate request using java.security or Bouncycastle programmatically?
HOW TO DEACTIVATE ALL COMMANDS, TEXTBOXES AND DROPDOWN BOXES ONNA FORM?
windows 7 home password policy
Does this HP ML370 G3 server support 64-bit OS?
extracting BLOBs
Upgrade Exchange SP2 to SP3