Pre-load Sql
If a Pre-load Action of "Execute pre-load Sql" was selected, then the Sql statement to execute before the load takes place should be entered in this box.
The contents of pre-load sql can be a sql statement or a procedural block. If using a single statement then the trailing semi-colon is not required for Oracle. If using a procedural block then the final semi-colon is required. The following examples illustrate the possible values in this field. Note the trailing semi-colon on the procedural block example.
|
Example of pre-load statements:
|
|
delete from load_customer where code < 23
|
|
truncate table load_customer
|
|
DECLARE
v_status number;
v_result varchar2(256);
BEGIN
update_dim_customer(1,'a','b',0,0,v_result, v_status);
END;
|
Note: Not all pre load SQL commands will work in a SQL Server database. These commands are executed as a batch. For example: create trigger as the second command will fail as it is not supported in batch mode unless it is the first command.