CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    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.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured