The Column Properties dialog allows you to modify the destination column information for a source column specified in a subscription, or specify how to calculate values for inserting a derived column.
For example, if the source data is for a legacy application that uses the character data type for a date field in the format of "2005-08-27", you could change the data type to datetime if it is being replicated to a SQL Server destination. If the format of the source data does not fit the requirements for the data type you want to use, you may need to add a derived column so you can convert the data as it is replicated. See the Derived Column Syntax topic for an example of using a derived column to change the data type of replicated data.
If the subscription performs incremental replication there may be an additional, derived Relative Record Number (RRN) column for tracking changes that need to be replicated to the destination. The properties of the RRN column cannot be changed.
Property |
Description |
Source Column Info |
If you are modifying a column, the Source Column Info displays the name and data type properties for the selected source column. If you are inserting a derived column, enter the expression to use for calculating the destination value from the source data in the Expression text box of the Source Column Info. See Derived Column Syntax for examples of defining derived columns. |
Column Name |
Specify a name for the destination column. If the subscription replicates data to an existing destination table, be sure the name you enter exactly matches the name of the column in the existing table. |
Data Type |
The drop-down list of data types reflects the data types that are recognized by the destination database. For the destination column, specify a data type that closely corresponds to the source column data type. If the subscription replicates data to an existing destination table, the destination table must already use the selected type for the specified column. For a derived column, you must specify a data type that is appropriate for the destination column. If the source and destination systems do not support the same data types, see Mapping Data Types for special considerations. |
Precision and Scale |
The Precision and Scale values that are valid depend on the Data Type specified for the column and the target database system. The precision and scale is fixed for some data types, and other data types have various ranges of precision and scale. The valid ranges for precision and scale also can differ among the various database systems (see Mapping Data Types). If the subscription replicates data to an existing destination table, the Precision and Scale settings must match those of the existing destination table. |
Nulls |
Enable (check) the Nulls option to allow the destination table to accept NULL values for the selected column. To prohibit NULL values, click to clear the check box. |
non-Critical |
Enable (check) the non-Critical option to designate a column as non-Critical. A change to the column will not trigger an update to the destination. This is a performance feature, potentially reducing the Apply load on the destination. However, the column will be updated when a change occurs to any other column lacking this attribute. |
Force Changes |
A set of check boxes that allow changes to be made when modifying multiple columns that have dissimilar values. Up to five check boxes may be enabled, based upon whether or not the item’s value is identical or dissimilar in all of the selections. If all the values are the same, then the user may enter a new value for that attribute without further confirmation. However, if the selections currently contain dissimilar values, then the user must first check the associated check box to enable data entry in the appropriate field. After this, any change made with “OK” will be applied to all selections, regardless of the original value. The five check boxes are “Source”, “Dest.Type”, “Precision”, “Scale” and “Nulls”. Some data types do not permit the direct specification of the Precision or Scale; in those cases the Data Type will force a value, whether or not the associated Force check box is checked. |
Modifying Multiple Columns: If you have selected multiple columns for modification by using the control or shift keys to select multiple list elements, then the source and destination column names are displayed as the special values of “^s” and “^d”, respectively. These are variables which will substitute the original “source” and “destination” names for each list element when OK is clicked. The variables may be combined with other text.
For example:
“RTRIM(^s)” means specify a source expression using the scalar function RTRIM on the source column denoted by “^s” and apply the change to each row in the selection.
“^d_01” will modify the destination name by adding a suffix of “_01” to the destination name.
Here you can see the effect of a prior substitution, where the prefix string “pre_” was added to some of the destination names: