Urgent Two Criteria query.. help

paddydive

Active Member
Joined
Jun 30, 2010
Messages
460
Hi,

I am using Access 2010. I have a query which is pulling data from multiple tables.

One of the table "Project" has field as Client Rank and Watch list.

Client Rank field has Ranks for a particular client and Watch List field has Yes/No

What I Need :

I need a query which will give me records for which Watch list is "Yes" and below that records with Client Rank less than 51

Note : The Watch list record are irrespective of client rank.

In short : I need all records with Watch List as Yes (Above) and all records where client rank is less than 51 (Below)

Please help
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Haven't used access for ages but in SQL which has similarities

Select *
From Project
Where project.Watch List = 'Yes'
And project.Client Rank < 51
Order by project.client rank desc

does that help ?
 
Upvote 0
But that will pull records where Client Rank is less than 51

The Watch List should be irrespective of Client Rank
 
Upvote 0
ah so

Select *
From Project
Where project.Client Rank < 51
Order by project.client rank desc

desc should then sort alphabetically and desc should make it Y followed by N
 
Upvote 0
Thanks Mole for taking trouble for this !!

Sorry but that will pull records where client rank < 51.

Let me explain what i need

1) Records where Watch list is Yes (irrespective of Client Rank, this will include all the records where Watch list is Yes, no matter what is client Rank)
2) All the records where client rank < 51
 
Upvote 0
light bulb
Code:
Select *
 From Project
 Where project.Watch List = 'Yes'

[B]UNION[/B]

Select *
 From Project
 Where project.Client Rank < 51
 Order by project.client rank desc
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,814
Messages
6,162,132
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top