Microsoft
Software
Hardware
Network
Question : Sum only positive values in ACCESS 2003 table
I have a table with fifteen columns that need to be summed for a report. There are about 150 rows BUT I only want to sum the positive values. That is, say TotalApp column has 145 rows with a positive value, but five with a negative. Is there an easy way to tell the query to only sum the 145 posuitive values and ignore the negative? I know I can do an If statemnt in the format of Iif(TotalApp <0, 0, TotalApp) but I really do not want to have to do this for all fifteen columns as this is eventually going to be run from a code module and not the query pane.
Answer : Sum only positive values in ACCESS 2003 table
I'm not sure if this is any better logistic-wise but you can do this with a sub-query as well.
SELECT SUM(TotalApp)
FROM (SELECT TotalApp FROM Table1 WHERE TotalApp > 0)
Random Solutions
windows 2000 server - credentials confllct
Excel 32 bit on XP Pro 64 bit ODBC connection...
Cisco 2600 VPN
Error message: Entering break mode failed, Source file does not belong to the project being debuugged.
Trying to insert a variable into a sql statement
aspx c# request not accepting new parameter
There is a problem with this website's security certificate since updating to IE8
Acer Aspire 5532 - Windows XP Drivers
IIS7 Port 80 Redirection in an App
Read permission - cannot view all documents in library