DBA Data[Home] [Help]

APPS.CSP_CMERGE_BB6 SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 15

    1) Update the customer_id

 ---------------------------------------------------------------------------- */

PROCEDURE MERGE ( req_id       IN NUMBER,
                  set_number   IN NUMBER,
                  process_mode IN VARCHAR2 ) IS

/* used to store a free form text to be written to the log file */

        message_text          char(80);
Line: 27

/* number of rows updated */

        number_of_rows        NUMBER;
Line: 49

/* merge the CS_MASS_SERVICE_TXNS_TEMP table update the customer_id */

        message_text := '***-- Procedure CS_MERGE_CUSTOMER_ID --**';
Line: 75

/* This process updates the customer_id of the CS_MASS_SERVICE_TXNS_TEMP table */

PROCEDURE CS_MERGE_CUSTOMER_ID (req_id       IN NUMBER,
                                set_number   IN NUMBER,
 				process_mode IN VARCHAR2 ) IS

/* used to store a free form text to be written to the log file */

        message_text          char(80);
Line: 85

/* number of rows updated */

        number_of_rows        NUMBER;
Line: 90

        SELECT yt.customer_id
        FROM   CS_MASS_SERVICE_TXNS_TEMP yt, RA_CUSTOMER_MERGES RACM
        WHERE
               yt.customer_id IN ( SELECT RACM.DUPLICATE_ID
                                   FROM   RA_CUSTOMER_MERGES RACM
                                   WHERE  RACM.PROCESS_FLAG = 'N'
                                   AND    RACM.REQUEST_ID   = req_id
                                   AND    RACM.SET_NUMBER   = set_number )
	FOR UPDATE NOWAIT;
Line: 114

             message_text := 'Starting to update the customer_id ( 1/1 )';
Line: 117

             UPDATE CS_MASS_SERVICE_TXNS_TEMP yt
             SET
               yt.customer_id = ( SELECT DISTINCT RACM.CUSTOMER_ID
                                  FROM   RA_CUSTOMER_MERGES RACM
                                  WHERE  yt.customer_id    = DUPLICATE_ID
                                  AND    RACM.PROCESS_FLAG = 'N'
                                  AND    RACM.REQUEST_ID   = req_id
                                  AND    RACM.SET_NUMBER   = set_number )
             WHERE
               yt.customer_id IN ( SELECT RACM.DUPLICATE_ID
                                   FROM   RA_CUSTOMER_MERGES RACM
                                   WHERE  RACM.PROCESS_FLAG = 'N'
                                   AND    RACM.REQUEST_ID   = req_id
                                   AND    RACM.SET_NUMBER   = set_number );
Line: 132

             arp_message.set_name( 'CS', 'CS_ROWS_UPDATED');
Line: 135

             message_text := 'Done with the update of customer_id';
Line: 145

              arp_message.set_name( 'CS', 'CS_ROWS_UPDATED');
Line: 148

              message_text := 'Done with the update of customer_id';