HKFuey
asked on
SQL View Syntax case etc
I want to add a number of fields, check if the result is greater than zero, then divide by number of months.
Something like: -
Can anyone help with the syntax?
Something like: -
case (dbo.Table.SalesQty1 + dbo.Table.SalesQty2 + dbo.Table.SalesQty3 + dbo.Table.SalesQty4 + dbo.Table.SalesQty5 + dbo.Table.SalesQty6) >0 then (dbo.Table.SalesQty1 + dbo.Table.SalesQty2 + dbo.Table.SalesQty3 + dbo.Table.SalesQty4 + dbo.Table.SalesQty5 + dbo.Table.SalesQty6) / 6
Can anyone help with the syntax?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER