Repeat | duplicate record
Usually choose duplicate records, all need to use distinct, but there is a bad place, that is, can not select multiple fields, Internet search for a long, in the dynamic network found a paste to solve this problem, the use of the following statement:
Sql= "Select a,b from tab where ID to (select min (id) from tab Group by a)"
About SQL distinct to prevent the confusion of recording repeated statements
It used to be very rare, but now there is a project that requires that the record not be duplicated
Rs.Open "Select Distinct Member from table 1 where theme =false and experience >200 ORDER by member Desc", link1,1,1
The above SQL statements can be taken out of the database eligible members (and can be implemented without back duplicate records), but if changed to the following three cases, there will be no record or call out records have duplicates or call out of the record anomaly, excuse me, this is why? does distinct specify a field to filter one at a time?
Rs.Open "SELECT Distinct * from table 1 where topic =false and experience >200 ORDER by member Desc", link1,1,1
Rs.Open "Select DISTINCT member, registration date from table 1 where theme =false and experience >200 order by member, registration date desc", link1,1,1
Rs.Open "Select DISTINCT member, registration date from table 1 where theme =false and experience >200 ORDER by member Desc", link1,1,1