|
-
January 24th, 2007, 08:50 PM
#5
Re: VB6 (Access) SQL Question
Thanks. It's working the way I want, this way.
Code:
SELECT DISTINCTROW Transactions.BatchDate, Sum(IIf([Transactions].[DeletedFlag]=1,0,1)) AS OpenTotal, Sum(IIf([Transactions].[DeletedFlag]=0,1,0)) AS ClosedTotal
FROM Transactions
WHERE (((Transactions.DeletedFlag) In (0,1)))
GROUP BY Transactions.BatchDate;
EDIT: Arrgh! Keep in mind that the IIF() statement seems to
work only if DeletedFlag is a String!!!
Last edited by dglienna; January 25th, 2007 at 09:14 PM.
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
|