CDC issue [message #358431] |
Tue, 11 November 2008 05:02 |
tanmoy1048
Messages: 133 Registered: June 2007
|
Senior Member |
|
|
I have implemented CDC and made the view perfectly.... and its working. its just a view with lot of thins.... is there any way to directly update a table with the new value?
thanx.
|
|
|
Re: CDC issue [message #358578 is a reply to message #358431] |
Tue, 11 November 2008 21:48 |
tanmoy1048
Messages: 133 Registered: June 2007
|
Senior Member |
|
|
I am rewriting the problem....
I have configured Change Data Capture and it works fine. I just want ...it will automatically update a destination schema's table. For example...
I have a table in source "TEST"
I populated a view of changed data namely TEST_VIEW.
Now is it possible to apply those changes to another table like TEST in another schema?
|
|
|
Re: CDC issue [message #358692 is a reply to message #358578] |
Wed, 12 November 2008 03:16 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Yes, it is possible. Most likely with update statements with correlated subqueries.
One example from that page:
The next example shows the following syntactic constructs of the UPDATE statement:
* Both forms of the update_set_clause together in a
single statement
* A correlated subquery
* A where_clause to limit the updated rows
UPDATE employees a
SET department_id =
(SELECT department_id
FROM departments
WHERE location_id = '2100'),
(salary, commission_pct) =
(SELECT 1.1*AVG(salary), 1.5*AVG(commission_pct)
FROM employees b
WHERE a.department_id = b.department_id)
WHERE department_id IN
(SELECT department_id
FROM departments
WHERE location_id = 2900
OR location_id = 2700);
|
|
|
|
|
|
Re: CDC issue [message #358977 is a reply to message #358896] |
Thu, 13 November 2008 02:24 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
I know that you can use it to set up subscriber views in target systems, like explained here.
As far as I know, (I could be wrong there since I haven't used it much) it is then up to you do actually do something with those views. Like using them in correlated subqueries to update some other tables in the target system.
|
|
|