I'm actually tryng to remove the duplicates on the query. The two tables are joined on a one to many relationship where many records in table 2 equal one record in table 1.
What my query does is remove all the zero values in table 2 then generates a report based on table 1's ID
What I need is to remove all the duplicate values on the ID field so that I can see which reports do not contain zero values.
Basically what it is:
TABLE 1 contains:
ID field, adress, name, date
TABLE 2 contains:
Reference number (=ID field table1), items, quantity
I'm generating a report based on table 1's ID field for all items used from table 2. My query ignores all zero values in quantity fild of table 2, but as soon as there is more that one item allocated to a single place in gives me duplicates and I don't want that.
I have tried to add select distinct to the SQL, but that doesn't seem to work, unless I'm doing something wrong(highly possible
)
Please help