I'm trying to merge two workspaces that contain version-enabled tables. I can't figure out how to resolve conflicts, because I have a lot of rows with the same ID value. They differ only in time interval. If I execute something like this:
DBMS_WM.ResolveConflicts('W_CHILD', 'SOME_TABLE', 'ID=1', 'CHILD');
Which row will be used? How can I specify concrete row?
Best Answer
Conflicts are automatically detected when a merge or refresh operation is requested, and they are presented to the user in conflict views. There is one conflict view for each table.Each conflict view has a name in the form table_name_CONF.
To keep the rows that you want, first of all let me show you the syntax of ResolveConflicts procedure.
You can use 'keep' parameter to decide on which(Parent, Child or Base) to resolve the conflicts.
In your case you have define 'CHILD' for keep parameter. And where_clause(ID=1 in your case) identifies the rows to be refreshed . Your procedure resolves conflicts involving rows in the SOME_TABLE table in W_CHILD where ID is 1, and uses the values in the child workspace to resolve all such conflicts.
For details visit Oracle documentation:DBMS_WM Package: Reference