select - Adding Columns in SQL -
I have a selected query in this equation
Monitoring Fees "+" CCN Fees "+" WKRPT fees "+" Monarchy fees "+" Client dashboard fees "+" Take control server fees "+" Patch Management Server Fees "+" Remote Batterbair Server Fees "
" Total Capped Server Fees "I see a problem is that it will only add if there is a value in each column but I want to add it Even if there is no data.
For the remote background server, the fees do not come by September of 2013. So the total closed server charge equation is not adding to the others until everything , It is starting in September 2013 instead of all the years.
some columns You are returning to
NULL . For example:
ISNULL ("monitoring fee", 0) + ISNULL ("CCN fee", 0) Instead of 0 < For the return of / code> + I ("client dashboard fees", 0) + ISNULL ("Take control server charge", 0) + ISNULL ("Patch Management Server Fees", 0) + ISNULL ( "Remote background server charges", 0) "Total capsed server fees" as
I think you are using SQL Server
If you If you are using MySQL then the same function is
IFNULL . IFNULL ("CCN Fees", 0) + IFNULL ("WkRpt Fees", 0) + IFNULL ("MonRpt Fees", 0) + IFNULL ("Client Dashboard Fees", 0) + IFNULL ("Take Control Server Fees" "Total Capped Server Fees" as the "Patch Management Server Fee", 0) + IFNULL ("Remote Background Server Fees", 0). >
Comments
Post a Comment