REM ---------------------------------------------------------
REM About Author of this Script
REM Ronney Rajapathirana
REM Created for BCD Travels
REM Project : Philips and Schneider Electric Tour Invoice Narration Patching
REM ---------------------------------------------------------

REM ---------------------------------------------------------
REM Setting up the Environmental Variables
REM ---------------------------------------------------------

spool off;

update id_tb_service_voucher_header set TBSVH_VOUCHER_DESCRIPTION=replace(TBSVH_VOUCHER_DESCRIPTION,'including  tax and service charges')
where tbsvh_sv_number in (select tbsvh_sv_number from
ke014t3.id_tb_booking_header a,ke014t3.ID_TB_SERVICE_VOUCHER_DETAILS B, ke014t3.id_tb_service_voucher_header c
where TBK_BOOKING_NUMBER=TBSVD_BOOKING_NUMBER
and tbk_status<>'F'
and tbk_customer in('P0056','S0185')
and TBSVD_SV_SERIAL=TBSVH_SERIAL
and extract(month from a.tbk_date)=(extract(month from sysdate))
and extract(year from a.tbk_date)=(extract(year from sysdate))
and TBSVH_STATUS in('P','T'));
update id_tb_service_voucher_header set TBSVH_VOUCHER_DESCRIPTION=replace(TBSVH_VOUCHER_DESCRIPTION,' including tax and service charge')
where tbsvh_sv_number in (select tbsvh_sv_number from
ke014t3.id_tb_booking_header a,ke014t3.ID_TB_SERVICE_VOUCHER_DETAILS B, ke014t3.id_tb_service_voucher_header c
where TBK_BOOKING_NUMBER=TBSVD_BOOKING_NUMBER
and tbk_status<>'F'
and tbk_customer in('P0056','S0185')
and TBSVD_SV_SERIAL=TBSVH_SERIAL
and extract(month from a.tbk_date)=(extract(month from sysdate))
and extract(year from a.tbk_date)=(extract(year from sysdate))
and TBSVH_STATUS in('P','T'));
REM ---------------------------------------------------------
REM Data File Has been Created
REM ---------------------------------------------------------


quit;