Print Page | Close Window

Needs Help With Writing SQL Query

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=16023
Printed Date: 29 March 2026 at 4:24pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Needs Help With Writing SQL Query
Posted By: Misty
Subject: Needs Help With Writing SQL Query
Date Posted: 29 July 2005 at 2:09am
Here's my current SQL Query: SELECT SumOfPaymentOwed = CASE WHEN ISNULL(Sum(Amounts.PaymentOwed),0) = 0 THEN 0 ELSE CONVERT(DECIMAL(10,2),Sum(Amounts.PaymentOwed)) END FROM Amounts WHERE PaidDate is Null AND ClientID = '" & strClientID & "'"
 
This works fine. However, I'd like for it to show something like: Amounts Paid Since [PaidDate]. I'd like to find the first paid date (ex: 4/05/2005) in the database and display the results like: Totals Paid: $200 since 4/05/2005. Could someone please help me with this?



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