|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
||||
|
||||
|
Dude i just totally helped myself cause i forgot to do this but my own thread reminded me how to. lol
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Adding all in 1 column |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|