RE: Quick SQL Sum Question

2003-08-14 Thread webmaster
of rows. -Mark -Original Message- From: Andrew Golden [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 8:27 AM To: CF-Talk Subject: Re: Quick SQL Sum Question At 03:27 PM 8/12/2003 -0500, you wrote: >How can I easily nab the SUM of the inventory.service_shipping records >r

RE: Quick SQL Sum Question

2003-08-14 Thread Mark A. Kruger - CFG
Can you post your attempt at using SUM( )? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 2:06 PM To: CF-Talk Subject: RE: Quick SQL Sum Question I need the sum...I am trying to get the total of additional shipping from the products

Re: Quick SQL Sum Question

2003-08-14 Thread Andrew Golden
At 03:27 PM 8/12/2003 -0500, you wrote: >How can I easily nab the SUM of the inventory.service_shipping records >returned in this query via SQL? SUM blah AS cblah tosses an error, I >suppose because just one part is aggregate? Any quick ideas? Have you tried SUM(blah) AS cblah? Sometimes odd li

RE: Quick SQL Sum Question

2003-08-14 Thread Mark A. Kruger - CFG
--Original Message- From: Andrew Golden [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 8:27 AM To: CF-Talk Subject: Re: Quick SQL Sum Question At 03:27 PM 8/12/2003 -0500, you wrote: >How can I easily nab the SUM of the inventory.service_shipping records >returned in this query via

Quick SQL Sum Question

2003-08-14 Thread webmaster
How can I easily nab the SUM of the inventory.service_shipping records returned in this query via SQL? SUM blah AS cblah tosses an error, I suppose because just one part is aggregate? Any quick ideas? SELECT customer_orders_prod_shiphold.

RE: Quick SQL Sum Question

2003-08-14 Thread Mark A. Kruger - CFG
ubject: Re: Quick SQL Sum Question >To use SUM( ) the column in question MUST be numeric type (int, decimal, > float etc). It doesn't have to be - this works (as long as all the rows can be cast) - select sum (cast(Value as decimal)) as val

Re: Quick SQL Sum Question

2003-08-14 Thread Alan Ford
>To use SUM( ) the column in question MUST be numeric type (int, decimal, > float etc). It doesn't have to be - this works (as long as all the rows can be cast) - select sum (cast(Value as decimal)) as val Regards, Alan Ford