Connecting Tech Pros Worldwide Help | Site Map

sub-queries using the IN Clause

  #1  
Old August 24th, 2007, 04:35 PM
Paul Wagstaff
Guest
 
Posts: n/a

Hi all

For many years I've had a need to produce many views using (at least) these
fields:

Field: ID
Field: User
Field: DateCleared

In this example, imagine the user's are reviewing a customer case, which is
considered 'live' until the user enters a clearance date

I want to count the total mumber of reviews per user and the total they've
cleared between various dates and show this data in a single view:

Group By: User Count: Total Workload Count: Total Cleared

I've always written two queries and then joined them togethor with a left
join on the Users field. I'd prefer to handle this with one query, but am
having trouble adapting what I've found to my problem.

thanks
paul


  #2  
Old August 24th, 2007, 09:05 PM
bobh
Guest
 
Posts: n/a

re: sub-queries using the IN Clause


Hi,
off the top of my head............
Make a query and add ID, User, DateCleared twice
Change the query to a 'totals' query
on the totals line group ID, group User, group first DateCleared,
count second Datecleared

this should get you started.........
bobh.

On Aug 24, 11:31 am, "Paul Wagstaff" <paulwagst...@blueyonder.co.uk>
wrote:
Quote:
Hi all
>
For many years I've had a need to produce many views using (at least) these
fields:
>
Field: ID
Field: User
Field: DateCleared
>
In this example, imagine the user's are reviewing a customer case, which is
considered 'live' until the user enters a clearance date
>
I want to count the total mumber of reviews per user and the total they've
cleared between various dates and show this data in a single view:
>
Group By: User Count: Total Workload Count: Total Cleared
>
I've always written two queries and then joined them togethor with a left
join on the Users field. I'd prefer to handle this with one query, but am
having trouble adapting what I've found to my problem.
>
thanks
paul

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Include local variable in Oracle Select Statement jinksto answers 8 July 19th, 2007 01:26 PM
DAO peculiarity in A97? MLH answers 24 January 6th, 2006 04:45 PM
Access 2k/2003: Touble with delete query using WHERE EXISTS Darin answers 14 November 13th, 2005 02:03 PM
Error Trapping In Access 2000 Peter Frost answers 6 November 12th, 2005 10:50 PM
How do I create an In-Statement in MS Access using records from a table? Peter Phelps answers 3 November 12th, 2005 03:35 PM