MajP
You've got your good things, and you've got mine.
- Local time
- Today, 18:06
- Joined
- May 21, 2018
- Messages
- 9,835
but the problem I am facing is the result (record rows) generared by union query is being append to tbltaks with QryTaskAppend once i run it, firstly like 20 records appended to tbltask but listen carefully when I run second time without any changes it still append the same 20 records which is already exist in tbltask and it was appended by this query just a while ago
I do not have to listen carefully, because I absolutely expect it to do that. Would be shocked if it did not do it. You have done nothing to stop it from creating duplicates. If you make a composite index it cannot add duplicates. Or if you you check to see if a record already exists you could stop it from importing. I would do both.
Not really this can be done with SQL pretty easily. You can write an append query that only appends records that do not exist in the destination.I know this can be done by code but it could be a intense code writing which I don't know
I think that's not possible, because when I use all tables PK as taskID in my tblTasks than it won't be unique anymore because all tables PK is having the number and autonumbers fields which will still be duplicates in TaskID
That may not be correct. In table Life Insurance, employee 1 has a record with say PK 123. No other employee has a PK of 123. If I make the PK
LifeInsurance123 in table task it is unique. In Table Passport there may be a PK of 123 but in Task it would be inserted as Passport123.
My question is when employee 1 gets a new life insurance do you update the information for that employee in life insurance or create a new record. If you update the Policy due date, I am uncertain how that creates a new or updated task.