Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : CDC_get_changed_columns


This scalar function uses change table name and _Change-FieldMap column as inputs and returns an array of field names that are changed based on the value of _Change-FieldMap column. For each bit whose _Change-FieldMap value is set to 1(ON), SQL returns the corresponding field name in the given Change table and forms and array of field names. The entire array is then returned as output.
Note: This function is used on a query which accesses the CDC Change Tracking table, which contains the CDC field map column.


CDC_get_changed_columns(pub.CDC_ch1, "_Change-FieldMap");
For example, if pub.CDC_ch1 is the change table and it has fields F1, F2, F3, F4, and F5 and if the _Change-FieldMap column of the Change tracking table contains the values as 11001, then the CDC_get_changed_columns function returns the values F1, F2, and F5.
SELECT CDC_get_changed_columns("pub"."CDC_mytb14", "_Change-FieldMap")FROM pub."_Cdc-Change-Tracking";


*‘F1;F2;F5’ is the character representation of the array of field names.
*The JDBC and ODBC drivers do not support array types, and so an array value will be converted to a sequence (or string) of names, each name delimited by a semicolon.