Welcome Guest! Log in
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.


The Replicator Rdbms supports two powerful properties which can let you alter select / insert expressions.

 

These properties work like patterns : their value is executed as an Xpath expression where [columnName] is replaced with the source column name, or [value] with the inserted value.

We are going to use these properties to apply a trim() function on a selection of columns, either on the source or the target.

 

Trimming at selection on the source

The idea is to apply a trim() to every selected column whose type is CHAR.

   {if (tech:type()='CHAR') then concat('trim(',tech:columnName(),')') else tech:columnName()}

Note : [columnName] cannot be used here because we opened an Xpath context with the curly brackets {}, this is why we use the Xpath expression tech:columnName() instead.

Trimming at insertion into the target

 {if (tech:type() = 'STRING') then 'trim([value])' else '[value]'}

 

 

You have no rights to post comments

Articles

Suggest a new Article!