utions - http://www.cooperebusiness.com
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H.
> Saxe
> Sent: Thursday, September 21, 2006 11:26 PM
> To: discussion@acfug.org
> Subject: Re: [ACFUG Discuss] Sum/CFSET
>
orgia> 404.691.4816>> Cooper e.business Solutions - http://www.cooperebusiness.com>>
> -Original Message-> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Dean H.> Saxe> Sent: Thursday, September 21, 2006 11:26 PM
> To: discussion@acfug.org> Subject: Re: [A
] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H.
Saxe
Sent: Thursday, September 21, 2006 11:26 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Sum/CFSET
SUM requires a group by clause.
SELECT sum(column_name) as sum_value FROM Table GroupBy column_name
-dhs
Dean H. Saxe, CISSP, CEH
[EMAI
11:26 PMTo: discussion@acfug.orgSubject: Re: [ACFUG Discuss] Sum/CFSET
SUM requires a group by clause.SELECT sum(column_name) as sum_value FROM Table GroupBy column_name-dhsDean H. Saxe, CISSP, CEH[EMAIL PROTECTED]
"[T]he people can always be brought to the bidding of the leaders.This is ea
Atlanta, Georgia
404.691.4816
Cooper e.business Solutions - http://www.cooperebusiness.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean H. Saxe
Sent: Thursday, September 21, 2006 11:26 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Sum/CFSET
, Georgia
404.691.4816
Cooper e.business Solutions – http://www.cooperebusiness.com
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, September 22, 2006
7:14 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss]
Sum/CFSET
To answer
This solution worked the best, letting the
database do the work. I just can not get the SUM function to work correctly,
but this is a nice work around.
THANKS!
Try SELECT value1 + value2 + value3 as daSum FROM yourtable
DK
On 9/21/06, Chris C.
Cooper <
[EMAIL PROTECTED
To
answer the first question, you can get rid of the "" problem
with:
If the
var is null or empty, Val() will change it to 0
If you
want to accomplish the same via SQL, try:
SELECT
mySum = ISNULL(col1, 0) + ISNULL(col2, 0) + ISNULL(col3,
0)
If you
try to add columns together and an
righto, but I took his description to mean he wanted to sum columns, not rows.DKOn 9/21/06, Dean H. Saxe <
[EMAIL PROTECTED]> wrote:SUM requires a group by clause.SELECT sum(column_name) as sum_value FROM Table GroupBy column_name
-dhsDean H. Saxe, CISSP, CEH[EMAIL PROTECTED]"[T]he people can alwa
SUM requires a group by clause.
SELECT sum(column_name) as sum_value FROM Table GroupBy column_name
-dhs
Dean H. Saxe, CISSP, CEH
[EMAIL PROTECTED]
"[T]he people can always be brought to the bidding of the leaders.
This is easy. All you have to do is to tell them they are being
attacked,
use the SQL Luke! Try SELECT value1 + value2 + value3 as daSum FROM yourtableDKOn 9/21/06, Chris C. Cooper <
[EMAIL PROTECTED]> wrote:
I've got a table with some fields I'm writing
numeric values to from a form. I have the Columns in the database (SQL 2005) as
Numeric fields.
I’ve got a table with some fields I’m writing
numeric values to from a form. I have the Columns in the database (SQL 2005) as
Numeric fields.
I’ve tried to sum the totals in SQL using SUM(value1,
value2, value3, value4, value5) as total, but I kept getting errors about
having to add
12 matches
Mail list logo