Query equal to a specific instance (1 Viewer)

mumbles10

Registered User.
Local time
Today, 04:56
Joined
Feb 18, 2011
Messages
66
I have a query that I am trying to build... Where I need to find a specific value that is not equal to any other value.

For example; Column 1 is Counterparty, and Column 2 is City. There can be multiple Cities for each Counterparty... I need to create a query where I find only the counterparties has (let's say) London and not equal to any other city...

Thanks.
 

Brianwarnock

Retired
Local time
Today, 08:56
Joined
Jun 2, 2003
Messages
12,701
try

Group on counterparty and criteria London , count Cities and criteria=1

Brian
 

mumbles10

Registered User.
Local time
Today, 04:56
Joined
Feb 18, 2011
Messages
66
try

Group on counterparty and criteria London , count Cities and criteria=1

Brian


Thanks for the reply, but I am not 100% sure I know what you mean.
 

Brianwarnock

Retired
Local time
Today, 08:56
Joined
Jun 2, 2003
Messages
12,701
Sorry had to rush my answer as I had to take an urgent call, shouldn't have done that.

I think that you are going to need two queries
1 to select all counterparty with only 1 City and the second which joins that back to your table on counterparty to select those where that is London, you of course only run the 2nd

You could use a subquery but 2 is simpler to code and debug

Brian
 
Last edited:

Users who are viewing this thread

Top Bottom