|
-
Jun 8th, 2000, 10:10 PM
#1
Thread Starter
Lively Member
I need some help in building a simple SQL statement:
For example say I have 3 Fields in my database
1) ItemName
2) Quantity
3) Price
What I need to generate is the Total Cost of all of the Items in the Database.
So for example...
ItemName, Quantity, Price
XXXX, 2, .50
YYYY, 4, 1.00
ZZZZ, 1, 2.50
------------------------------------
Total Cost 7.50 < -this is what I need
Total Cost =(quantity*Price) for XXXXX + (quantity*Price) for YYYY + (quantity*Price) for ZZZZ
I am just wondering how to write this as an SQL statement...can anyone help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|