As long as the same criteria apply when summing x, y, and z then yes you can do
it all in one query.
This may depend on the DB you are using, but most likley it is possible....just
with varying syntax depending on the DB.
The key is that you MUST GROUP BY the columns being summed
So some loose code...
WHERE 1=1
AND effectiveDate >= today's date
GROUP BY X,Y,Z
FYI you will ONLY be returning those summed columns....no other columns
HTH
If you want something more precice....post the database....the table
structure....and what you're after ;-)
Cheers
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
Notice:
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648
Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2926
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6