select 
TICKET_EXECUTIVE TC,
upper((select exec_name from id_executive_master where exec_code=TICKET_EXECUTIVE and rownum=1)) TC_NAME,
Ticket_Date,
PROJECT_NUMBER PR_TR_NO,
TICKET_LPO PO,
Upper(replace(TMD_APPROVED_BY||tmd_flex_v_20,'-','')) Booker,
upper(TICKET_PAX_NAME) PAX_NAME,
PNR_NUMBER PNR,
AIRLINE_NAME Airline,
TICKET_NUMBER TKT_NO,
TICKET_ROUTING Routine,
Ticket_currency INV_CCY, 
Ticket_net_receivable INV_AMOUNT
from ke074t3.ticket_view_t3
left join ID_TICKET_MORE_DETAILS_MMI
on TICKET_REFERENCE=tmd_REFno
where
ticket_status='S'
And stock_airline<>'MISC'
and TICKET_CUSTOMER_1 in ('S0171','S0175', 'S0177')
and ticket_date between
(TRUNC(sysdate-4, 'DAY'))
and
(TRUNC(sysdate, 'DAY')-1)
order by
Ticket_date, Ticket_executive



select 'SAFCOM' Branch, TBPM_PROVIDER,replace(replace(replace(replace(TBPM_NAME,',','-'),chr(9),'-'),chr(10),'-'),chr(13),'-')
from id_tb_provider_master

select tbrd_system,tbrd_supplier, (select replace(replace(replace(replace(TBPM_NAME,',','-'),chr(9),'-'),chr(10),'-'),chr(13),'-')
from id_tb_provider_master where tbrd_supplier=tbpm_provider and rownum=1) Sup_name
from id_tb_booking_rate_details where tbrd_system like 'SV%' and tbrd_supplier is not null
