Hi,
I need to run an append query (or do insert into sql) for records that are updated frequently. I have want to insert a new record if the ReqUNID exists but the taskStatus has changed OR if the ReqUNID does not currently exists. This is my current SQL:
Thank you
I need to run an append query (or do insert into sql) for records that are updated frequently. I have want to insert a new record if the ReqUNID exists but the taskStatus has changed OR if the ReqUNID does not currently exists. This is my current SQL:
Code:
INSERT INTO Join_tbl ( ReqUNID, TaskTeam, TaskAssignee, taskStatus )
SELECT dbo_vwAssignments.ReqUNID, dbo_vwAssignments.TaskTeam, dbo_vwAssignments.TaskAssignee, dbo_vwAssignments.taskStatus
FROM dbo_vwAssignments
WHERE (((dbo_vwAssignments.TaskTeam)="chp-vm") AND ((dbo_vwAssignments.taskStatus)="acknowledged" Or (dbo_vwAssignments.taskStatus)="new" Or (dbo_vwAssignments.taskStatus)="pending" Or (dbo_vwAssignments.taskStatus) Is Null));
Thank you