Re: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Dean H. Saxe
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 >

Re: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Teddy Payne
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

Re: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Dean H. Saxe
] [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

Re: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Teddy Payne
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

RE: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Chris C. Cooper
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

RE: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Chris C. Cooper
, 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

RE: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread Chris C. Cooper
  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

RE: [ACFUG Discuss] Sum/CFSET

2006-09-22 Thread axunderwood
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

Re: [ACFUG Discuss] Sum/CFSET

2006-09-21 Thread Douglas Knudsen
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

Re: [ACFUG Discuss] Sum/CFSET

2006-09-21 Thread Dean H. Saxe
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,

Re: [ACFUG Discuss] Sum/CFSET

2006-09-21 Thread Douglas Knudsen
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.  

[ACFUG Discuss] Sum/CFSET

2006-09-21 Thread Chris C. Cooper
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