ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 16th, 2004, 10:21 PM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 187 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 17 h 32 m 22 sec
Reputation Power: 0
Arrow Adding all values in 1 column

Heres how you add up all the values in a column and create a variable to play with.

Code:
<CFQUERY NAME="Alas" DATASOURCE="ThaDatabase"
SELECT SUM(NameOfColumn) as VaribleThatIMakeUP
FROM Client
</CFQUERY>


Who tha man?!

-Alas

Reply With Quote
  #2  
Old October 17th, 2004, 07:22 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,700 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 17 h 45 m 21 sec
Reputation Power: 53
These are SQL aggregate functions. This is actually basic, straightforward SQL stuff, so while you're not really "the man" for figuring this out, it's always good to have folks like you post helpful items!

Other aggregate functions that are supported by most RDBMS systems: count(), min(), max(), and avg(). In addition to these common ones, most database systems have specific functions as well. For example, Oracle has stddev() to calculate standard deviation, along with others. And most enterprise systems also have the means to perform complex aggregations and sub-aggregations for reports, etc.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Last edited by kiteless : October 17th, 2004 at 07:24 PM.

Reply With Quote
  #3  
Old October 18th, 2004, 03:41 AM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 187 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 17 h 32 m 22 sec
Reputation Power: 0
Cool

um...yeah...*cough* how do i put this, well this post of mine didn't technically, you know exactly start off as me giving free advise it was more me...um you know, asking how to add values in a column , 4 hours later i found the answer and changed my post question into an answer.
So well to me I'm Still what i would consider... "Tha Man."

-Alas

Reply With Quote
  #4  
Old July 13th, 2005, 02:06 PM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 187 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 17 h 32 m 22 sec
Reputation Power: 0
Dude i just totally helped myself cause i forgot to do this but my own thread reminded me how to. lol

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Adding all in 1 column


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT