Charles Baldo
asked on
Need Stored Procedure that adds only when matching column is true
Hello
I have 5 columns in a database with a value
val1
..
..
..
val5
and 5 matching bit columns
ValBit1
..
...
..
ValBit5
I need to sum up the values in val1 only when Valbit1 is true Val2 when Val2 is true etc etc
all returning 1 summed value
I need to do this is a stored procedure not sure how to proceed?
Thanks
I have 5 columns in a database with a value
val1
..
..
..
val5
and 5 matching bit columns
ValBit1
..
...
..
ValBit5
I need to sum up the values in val1 only when Valbit1 is true Val2 when Val2 is true etc etc
all returning 1 summed value
I need to do this is a stored procedure not sure how to proceed?
Thanks
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.
ASKER