I am trying to retrieve DISTINCT records from a joined table set. Here is a basic table layout;
Registration Table-
ID | Cost | Date
1 | 6.95 | 6/30/01
1 | 0.00 | 6/30/01
2 | 2.95 | 6/31/01
2 | 0.00 | 6/31/01
...
Customer Table-
ID | Name | Company
1 | Fred | XYZ
2 | Tom | ABC
My query string;
"SELECT DISTINCT Registration.ID, Registration.Cost, Customer.ID, Customer.Name, Customer.Company FROM Registration, Customer WHERE Customer.ID=Registration.ID AND Registration.Cost > 0.00"
This always returns every record that matches ID, I only want to return the record where the Cost is a true value. Any ideas?
Mark