Running Multiple SESSION SQL statements for EIM Processes

7/09/2012 No Comment

This article describes how to run multiple SESSION SQL statements for EIM Processes.

The method used is to break up the original EIM process into 2 separate processes, each with a SESSION SQL. To add another SESSION SQL, create a dummy process that contains the other SESSION SQL. Users can either set the BATCH NUMBER for this dummy process to an unused batch number, or use an unused EIM table. Create a shell process to call both processes.

For example, to import only the activities of the type 'In Store Visit',the following SESSION SQL is used to delete all the other activities from the EIM table:
delete from EIM_ACTIVITY where act_todo_cd <> 'In Store Visit' and if_row_batch_num = 1 and if_row_stat = 'FOR IMPORT'
To update Activity type code as 'Activity' for all activities, the following SESSION SQL is used :
update EIM_ACTIVITY set act_cal_type_cd = 'Activity' where if_row_batch_num = 1 and if_row_stat = 'FOR IMPORT'
To achieve this 2 SESSION SQLs, configuration file should look like this:

[SESSION SQL Step]
SESSION SQL = "delete from EIM_ACTIVITY where act_todo_cd <> 'In Store Visit' and if_row_batch_num = 1 and if_row_stat = 'FOR IMPORT'"
TYPE = IMPORT
BATCH NUMBER = 9999
TABLE = EIM_ACTIVITY
[Activities Import Step]
SESSION SQL = "update EIM_ACTIVITY set act_cal_type_cd = 'Activity' where if_row_batch_num = 1 and if_row_stat = 'FOR IMPORT'"
TYPE = IMPORT
BATCH NUMBER = 1
TABLE = EIM_ACTIVITY
[Import New Activities]
TYPE = SHELL
INCLUDE = SESSION SQL Step
INCLUDE = Activities Import Step
In the first Process there are no rows in the interface table which corresponds to this batch number. This means that no rows exist to be imported from this interface table.

EIM processing will continue with the second process. The SESSION SQL defined in [Activities Import Step] will be executed and the resulting Activities rows will be imported into the Siebel base tables.
Related Posts


No comments :

 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer