Create a PROC - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
Last updated
2024-11-25
Published on
2024-11-25T15:00:28.224244

PROCs are created using the CREATE PROC command. The PROC consists of a SELECT command that contains one or more Functions.

Example

A pair of identical mapping functions currently exist at several locations within the SELECT command in the main processing section of the script. A decision is made to modularize the script by placing the two (LEFT and RIGHT) mapping instructions in a separate PROC which will then be called whenever needed.

In order to create a PROC containing these mapping functions, simply add a CREATE PROC command before the mapping functions as follows and move the group of lines.
CREATE PROC proc_name AS
SELECT
{
   TARGET_FIELD1   = LEFT(SOURCE_FIELD1, 3)        
   TARGET_FIELD2   = RIGHT(SOURCE_FIELD2, 3)      
}
FROM INPUT_DATASTORE;