CREATE OR REPLACE VIEW SD_HOSPITAL.VW_BQ_BRTZXX
 (
 ID0000, ZYID00, TZLBID, JLRQ00, JLSJ00, SZ0000, LRR000, LRRQ00, LRSJ00, 
DW0000, TZLBMC

 )
 AS 
SELECT t1.ID0000,t1.ZYID00,t1.TZLBID,
               TO_CHAR(TO_DATE(JLRQ00,'YYYY.MM.DD'),'YYYY.MM.DD') JLRQ00,
               TO_CHAR(TO_DATE(JLSJ00,'HH24:MI:SS'),'HH24') JLSJ00,
              nvl(TO_CHAR(t1.sz0000),t1.tznr00)  SZ0000,LRR000,LRRQ00,LRSJ00,t2.DW0000,t2.TZLBMC
    FROM   BQ_BRTZXX t1,BQ_TZLB00 t2
    WHERE  t1.TZLBID=t2.TZLBID
/
