Connecting Tech Pros Worldwide Help | Site Map

sub-queries using the IN Clause

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 24th, 2007, 03:35 PM
Paul Wagstaff
Guest
 
Posts: n/a
Default sub-queries using the IN Clause


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, 08:05 PM
bobh
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.