Hello Friends ,
I have a pl/sql block that should be executed by autosys job scheduler .
For the scheduler to execute , the pl/sql block needs to be written as .sh script.
The following is the pl/sql block . Can any one let me know how to create the same in .sh file.
=========================
DECLARE
TYPE tbl_col_type is TABLE of VARCHAR2(50);
L_table_col tbl_col_type := tbl_col_type('X_REV_M02_RSTM');
l_sql_stmt VARCHAR2(32000);
BEGIN
FOR rec IN L_table_col.FIRST..L_table_col.LAST
LOOP
l_sql_stmt := 'UPDATE '||'KAW_OWNER.'||L_table_col(rec)||
' SET X_REVENUE_TYPE_CD = REPLACE(X_REVENUE_TYPE_CD, ''-'', ''_'')'||
' WHERE INSTR(X_REVENUE_TYPE_CD, ''-'') > 0' ;
EXECUTE IMMEDIATE l_sql_stmt ;
END LOOP;
END;
====================
The autosys job scheduler runs the .sh file
thanks/mike