I am using this sql statement to join two tables together where the return_date in one table is null.
SELECT
Customers.CustomerID, Customers.First_Name,
Customers.Surname, Customers.House_No,
Customers.Street, Customers.County, Customers.Postcode,
IssueBook.Return_Date
FROM
Customers
INNER JOIN
IssueBook ON Customers.CustomerID = IssueBook.CustomerID
WHERE
((IssueBook.Return_Date IS NOT Null));
This statement is then used to fill a datagrid on a form. However when I view the datagrid they're could be duplicated rows as the customer may have taken more than one book out( just so you know I'm creating a library system). This means there is duplicated data. I know I can do a SELECT DISTINCT statement and delete the other rows and put the DISTINCT rows back in but I'm not sure how to do this as can I use a DISTINCT statement on the datagrid or will it have to be on the INNER JOIN sql statement? Please help?