Right trying to do this and it is annoying me.
Got 2 queries.
and
The first returns several records and I need to select from the second based on these like having HMapping = x Or Y OR z Or etc
I've tried a join from HMapping to Mapping (table relationships) but it returns one record from the IS for each mapping i.e. each line about 1000 times.
I think I need a nested SQL statement but can for the life of me think where to start on this one.
If that fails I'll have to store the items in an array and formulate a sql statement but a nested SQL will be far easier?
Ideas?
Got 2 queries.
Code:
SELECT DISTINCT Hierarchy.Mapping FROM Hierarchy WHERE (((Hierarchy.Department_Number)=170) AND ((Hierarchy.Section_Number)=510));
Code:
SELECT * FROM [IS] WHERE ((([IS].Country)='CZ') AND (([IS].HMapping)="H11AA"));
I've tried a join from HMapping to Mapping (table relationships) but it returns one record from the IS for each mapping i.e. each line about 1000 times.
I think I need a nested SQL statement but can for the life of me think where to start on this one.
If that fails I'll have to store the items in an array and formulate a sql statement but a nested SQL will be far easier?
Ideas?

Comment