MS Access Unique Constraint with more than 10 fields -
i know limitation of access, know of workaround allow me avoid duplicate records in situation table has 30 fields , don't want duplicate combinations of 30 fields?
i'm batch loading financial data on regular basis , want add records if of information particular project id has changed since last load. when run append query adds new records hoping use constraint block inserts, trying figure out solution.
to insert non-duplicating records, need filter out duplicate ones in query where not exists
subquery, this:
insert ttgt (project_id, field1, ..., field30) select project_id, field1, ..., field30 tsrc not exists ( select project_id ttgt ttgt.project_id = tsrc.project_id , ttgt.field1 = tsrc.field1 ... , ttgt.field30 = tsrc.field30 )
the subquery rather lengthy, in end it's same work index have do.
Comments
Post a Comment