A simple Query?
Posted: Mon Jul 26, 2010 4:26 am
Am trying to write a query, seems simple enough
SELECT SUM(members.Under_15_Vic) + SUM(members.Under_12_Vic) + SUM(members.Under_18_Vic)
FROM members
All I want to do is get a total of the 3 columns, it works providing all the columns have a value.
If a column has no values entered (all entries are null) then the SUM ceases to work?
The columns represent payment for junior tournaments, column type is set as Numeric, tinyint
The outcome of the query is being used as part of a summary page, Is there a way I can then Insert the outcome into another table?
SELECT SUM(members.Under_15_Vic) + SUM(members.Under_12_Vic) + SUM(members.Under_18_Vic)
FROM members
All I want to do is get a total of the 3 columns, it works providing all the columns have a value.
If a column has no values entered (all entries are null) then the SUM ceases to work?
The columns represent payment for junior tournaments, column type is set as Numeric, tinyint
The outcome of the query is being used as part of a summary page, Is there a way I can then Insert the outcome into another table?