Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 28th, 2008, 12:53 PM
Authorized User
 
Join Date: May 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding all the rows to get a total value

Hi, Im trying to add all the wage rows in my database to get a total wage value is this possible and if so any ideas where to start thanks in advance

 
Old May 28th, 2008, 01:10 PM
Authorized User
 
Join Date: May 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found it i knew it was an easy bit of code sorry for wasting your time and for anyone else looking for the same code its simply as follows
SELECT SUM(Wages) AS Expr1
FROM Employees
Thanks again

 
Old May 29th, 2008, 03:22 AM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you use punctuation, it might be a little easier for others to read your post.






Similar Threads
Thread Thread Starter Forum Replies Last Post
adding up a whole colum to give a total number KeviJay VB Databases Basics 2 May 29th, 2008 08:15 AM
Adding values to Running Total hafizfarooq Crystal Reports 0 September 12th, 2006 07:53 AM
Adding new rows to Datagrid MixedCode General .NET 1 April 10th, 2005 05:00 PM
total number of rows in a recordset lian_a Classic ASP Basics 2 February 8th, 2005 08:13 AM
Having problems returning total rows to asp Trojan_uk SQL Server 2000 1 December 9th, 2003 12:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.