Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 December 22nd, 2007, 01:10 AM
Registered User
 
Join Date: Nov 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to retrieve the amount

hi
my table contains month(from 1 to 12),year fields as integer ones and receipts as currency fields. i want to retrieve the sum(Receipts) based on the system time.
pls tell the query

with regards
ramesh


 
Old December 26th, 2007, 12:38 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Not sure what you want here. You want receipts total in the current month. Is that what you mean by system time?

SELECT SUM(Receipts) AS TotalReceipts FROM tblReceipts WHERE Month = " & Now.Month & " AND Year = " & Now.Year & "






Similar Threads
Thread Thread Starter Forum Replies Last Post
x amount of records per column Adam H-W Classic ASP Basics 4 April 27th, 2007 12:21 PM
Counting amount of record rtr1900 Classic ASP Databases 2 December 1st, 2005 08:08 AM
Finding the highest amount keithd Excel VBA 2 May 25th, 2005 01:44 PM
Total Amount display doosti Classic ASP Databases 2 November 14th, 2004 07:25 AM
displaying amount with , separator msrnivas .NET Web Services 1 July 15th, 2004 02:09 AM





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