Print Page | Close Window

Needs Help With Adding Totals

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15390
Printed Date: 29 March 2026 at 6:28pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Needs Help With Adding Totals
Posted By: Misty
Subject: Needs Help With Adding Totals
Date Posted: 07 June 2005 at 2:24am
I have a database named Amounts. The field names are: AmountID (PK), ClientID (FK), MonthID (FK), Service, PaymentOwed (Money Value in SQL Server Database), PaidDate, and PaymentMethod.
 
I'd like to add the totals of PaymenOwed for all fields that have a certain ClientID where the PaidDate field is null. Can someone please help me write the sql query or stored procedure? Thanks!
 
 



Replies:
Posted By: Phat
Date Posted: 07 June 2005 at 3:11am
try

SELECT Sum(Table1.PaymentOwed) AS SumOfPaymentOwed
FROM Table1
WHERE (((Table1.PaidDate) Is Null) AND ((Table1.ClientID)=2));



-------------
http://buildit.sitesell.com/sitebuildithome.html - Get a website that sells



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net