Selectively deleting records during synchronization
sridharc
Posts: 2
Hi everyone,
I am trying to figure out how to selectively delete records during synchronization. I would only want to compare and delete those records in the destination depending on a flag that I set on parent table(s). I know we can use a WHERE clause but the column has to be present in the destination table. In my case, only the parent table(s) is flagged and I need to check this flag during compare and synchronization. I am thinking if there is something like a join we can do to retrieve records for comparison or is there an alternative solution?
Regards,
Sridhar
I am trying to figure out how to selectively delete records during synchronization. I would only want to compare and delete those records in the destination depending on a flag that I set on parent table(s). I know we can use a WHERE clause but the column has to be present in the destination table. In my case, only the parent table(s) is flagged and I need to check this flag during compare and synchronization. I am thinking if there is something like a join we can do to retrieve records for comparison or is there an alternative solution?
Regards,
Sridhar
Comments
You should be able to reference another table in the where clause by using a nested select statement. It seemed to work ok in a quick test I completed here.
For example, you could construct a where clause similar to:
id > 3 OR id = (select id from othertable where id > 3)
I hope this is helpful.
Let me know if you need anything further.