hi there how would i change the following oracle sql code to t-sql.

select
NEXT_DAY(((TO_DATE(T1."DDATE" ,'yyyymmdd' )) + (-1)),'Sunday'),
T2."TWARD",
DECODE(LEAST(RTRIM(T1."DTIME" ) ,'11:00:00'),
NULL,
0 ,
RTRIM(T1."DTIME" ),1,0), T1."DURNO"
from
"IBA"."LIVE_PATDSCHF" T1,
"IBA"."LIVE_PATMI1AF" T3,
"IBA"."LIVE_PATTRANF" T2
where
T3."DAADMNO" = T2."DTADMN"(+)
and
T2."TWARD"
in (
'ADA',
'ALE',
'AMO',
'BOB',
'CAT',
'DOL',
'ELI',
'EMU',
'FEL',
'CCU',
'LYD',
'MAR',
'MEL',
'NAS',
'SAU',
'VIC'
)
and
NEXT_DAY(((TO_DATE(T1."DDATE" ,'yyyymmdd' )) + (-1)),'Sunday')>=to_date('2000-09-01 00:00:00', 'YYYY-MM-DD HH24:MIS')
and DECODE(T2."TMOVE",'A','Admission' ,'D','Discharge','C','Change Rec.','L','On Leave','R','Ret. Leave','** Invalid **')='Discharge'
and T3."DAADMNO"=T1."DDADMNO"