Question : sql in access problem

hello,

why is this sql bringing back all records?

 SELECT * FROM table1  WHERE (field1 IN (
SELECT DISTINCT field1 FROM table2  WHERE id =4)
Or field1 IN (
SELECT DISTINCT field1 FROM table3  WHERE id = 4)
 or field1 IN (      
SELECT DISTINCT field1 FROM table4  WHERE id =4))


thank you.

Answer : sql in access problem

This works here:

  SELECT * FROM table1  
  WHERE
    (field1 IN (
      SELECT field1 FROM table2  WHERE id = 4)
    OR field1 IN (
      SELECT field1 FROM table3  WHERE id = 4)
    OR field1 IN (      
      SELECT field1 FROM table4  WHERE id = 4))

/gustav
Random Solutions  
 
programming4us programming4us