Filtering When @BEFORE <> @AFTER for NULL columns (Doc ID 2165636.1)

Last updated on APRIL 12, 2017

Applies to:

Oracle GoldenGate - Version 12.1.2.1.0 and later
Information in this document applies to any platform.

Goal

Trying to use @STREQ with @BEFORE and @AFTER to only replicate transactions when any of a specific set of columns have been changed.

 

Currently with STREQ when the two columns being compared are both NULL's it doesn't consider it as equal and thus doesn't return "1".  User wanted the result to be returned as EQUAL (1)  when both the values were NULL.

 

CASE 1:

BEFORE - CLASSIDENTIFIER = 'ABC'
AFTER - CLASSIDENTIFIER = 'ABC'

@STREQ (@BEFORE (CLASSIDENTIFIER), @AFTER (CLASSIDENTIFIER)) result returned is = 1

 

 

CASE 2:

BEFORE - CLASSIDENTIFIER = NULL
AFTER - CLASSIDENTIFIER = NULL

@STREQ (@BEFORE (CLASSIDENTIFIER), @AFTER (CLASSIDENTIFIER))   result returned is  <> 0

 

CASE 3:

BEFORE - CLASSIDENTIFIER = NULL
AFTER - CLASSIDENTIFIER = 55

@STREQ (@BEFORE (CLASSIDENTIFIER), @AFTER (CLASSIDENTIFIER)) result returned is  <> 0

 

CASE 4:
BEFORE - CLASSIDENTIFIER = 55
AFTER - CLASSIDENTIFIER = 66

@STREQ (@BEFORE (CLASSIDENTIFIER), @AFTER (CLASSIDENTIFIER)) result returned is = 0

 

 

 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms