Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Task Summary query/report help

Author  Topic 

fornit
Starting Member

2 Posts

Posted - 2008-02-08 : 15:52:14
I am trying to create a query/report to summarize a Task table. The basic (relevant) table structure is:
Owner (Text),
Task (Memo),
Status (Memo),
Resolution (Memo).

I want to generate a table in a report that shows who has Open, Pending, and Completed tasks and shows the count of how many tasks that person has in each category.

Open = (Task <> "" And Status = "" And Resolution = "")
Pending = (Status <> "" And Resolution = "")
Closed = (Resolution <> "")

This has proven to be beyond my meager SQL abilities. Any help would be appreciated.

Thanks!

georgev
Posting Yak Master

122 Posts

Posted - 2008-02-15 : 09:10:22
[CODE]
SELECT owner
, Sum(Iif(Task <> "" And Status <> "" And Resolution <> ""), 1, 0) As [Open]
, Sum(Iif((Status <> "" And Resolution = ""), 1, 0) As [Open]
, Sum(Iif((Resolution <> ""), 1, 0) As [Open]
FROM theTable
GROUP
BY owner
[/CODE]

Please note that I'm not 100% clued up on the SQL syntax for JET so don't expect this tow rok straight off the bat without some tweaking. Hopefully it'll give you an idea of how to get the results you want :)


George
<3Engaged!
Go to Top of Page

fornit
Starting Member

2 Posts

Posted - 2008-02-15 : 13:21:13
Yup, needed a small bit of tweaking, but it was exactly what I needed.

Thanks!
Go to Top of Page
   

- Advertisement -