-- ABS-86567

create or replace procedure modifytransferstatus is
stmt varchar2(1000);
	begin
		for x in (SELECT T.TABLE_NAME FROM USER_TAB_COLUMNS T WHERE T.COLUMN_NAME = 'TRANSFER_STATUS'
				  AND T.TABLE_NAME LIKE 'ERP%'
				  AND T.DATA_DEFAULT IS NULL
				  AND T.NULLABLE = 'N')
		loop
			begin
				stmt := 'ALTER TABLE ' || X.TABLE_NAME || ' MODIFY TRANSFER_STATUS DEFAULT 0';
				execute immediate (stmt);
			exception 
			 when others then
			  null;
			end;
		end loop;

end modifytransferstatus;
/

execute modifytransferstatus;
drop procedure modifytransferstatus;