Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 24th, 2007, 04: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, 09: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

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles