Question on setting up rules for Streams [message #216033] |
Wed, 24 January 2007 14:45 |
Rustican
Messages: 51 Registered: July 2006
|
Member |
|
|
I'm trying to set up rules for the capture and propogation streams that i've created on my database. I want to filter out inserts into various tables. An example would be if i wanted to capture all the inserts into the employee table but only if the employee resided in a specific zipcode location.
Select * from employee where employee_id in (select employee_id from address where zipcode = 12345)
I'm not sure if i want to add it as a table_rule or as a subset_rule.
Also do i have to have this rule for my capture, propogation and apply streams?
I tried implementing the below ruleset.
BEGIN
DBMS_STREAMS_ADM.ADD_SUBSET_RULES(
table_name => 'dbs1.employee',
dml_condition => 'state = 'NY'',
streams_type => 'capture',
streams_name => 'stream_capture',
queue_name => 'streams_queue',
include_tagged_lcr => false,
source_database => 'dbs1.net');
END;
And i seem to be getting a problem because of the single quotes (') when i define my state as 'NY'. is there something that will fix this?
Also will doing the following work as well?
dml_condition => 'employee_id in (select employee_id from address where zipcode = 12345)',
|
|
|