Query Criteria Problem

___

¯¯¯¯¯
Local time
Today, 04:40
Joined
Nov 27, 2003
Messages
595
I have a query which selects all Euro Customers from a table. This I have done by using the following as the criteria...

HAVING (((dbo_HistoryHeader.DocumentType)=4) AND ((dbo_CustomerMaster.PriceRegime)=2));

PriceRegime 2 being Euro. I also need to pull out 4 Other Customers who have a PriceRegime 1 from the same query. I can't think of the best way to do this. Would it be a Union query?

TIA
 
Have you tried the In operator? In(1,4) or something like that. It's better to use the Where clause than the Having too
 
Thanks for the reply Rich, I'm having a little trouble trying to work it out though :confused: (Bad day!)
 
For anyone who's interested, I created another table containing the customers codes I needed from price regime 1, added the table to the query, created an Outer join to the Customer master table on Customer Code, kept the criteria in the price regime column as 2 and in the second criteria of the new table field added "Is Not Null". :)
 

Users who are viewing this thread

Back
Top Bottom