CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 SQL Help

Print topic Send  topic

Author Message
Frank Rocco
Posted: 05/22/2001, 10:24 AM

Hello,

In codecharge I want to select fld1, fld2, sum(fld3) and group on fld1 and
total the sum(fld3)

fld1 fld2 Sum(fld3)
AA BB 100
AA SS 200
Break---- 300

How is this done?
I no this is not a codecharge problem, but need advise.
Can you point me to a link where I can get more knowledge of this?

Thanks
Frank

Walker P.
Posted: 05/23/2001, 9:21 AM

Frank,
the Bookstore example application which comes bundled with CodeCharge has
some SQL statements which perform computations like you mentioned. If you
look at the SQL tab of the 'Items' form in the 'ShoppingCart' page, you will
see a SQL statement:

select order_id, name, price, quantity, member_id, quantity*price as
sub_total
from items, orders where orders.item_id=items.item_id order by order_id

which performs a multiplication operations. The 'Total' form in the same
page has another SQL statement:

select member_id, sum(quantity*price) as sub_total from items, orders where
orders.item_id=items.item_id
group by member_id

which performs multiplication and summation. If you want to learn more about
SQL operations, I would advice you to get a hold of a good SQL book or look
at online resources such as www.informit.com.

Regards.

Walker P.
CodeCharge Support


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.