SQL寄存

来源:互联网 发布:迅雷cookie制作linux版 编辑:程序博客网 时间:2024/05/06 11:35

···············································································································


SELECT to_char(attend.cfondate,'yyyy-mm-dd') startDate,

       to_char(attend.cfstarttime,'HH:mm') startTime,
       to_char(attend.cfendtime,'HH:mm') endTime,
       person.fname_l2 manager,
       attend.cfteachername teacher,
       attendEntry.Cfstudentname student,
       studentAttendStatus.Fname_L2 studentAttendStatus,
       teacherAttendStatus.Fname_L2 teacherAttendStatus,
       attend.fnumber attendNumber
       FROM Ct_V3k_Attendgxh attend 
       LEFT JOIN ct_v3k_attendgxhentry attendEntry ON attend.fid = attendEntry.Fparentid
       LEFT JOIN t_Bd_Person person ON person.fid = attendEntry.Cfmanagerid
       LEFT JOIN ct_v3b_stuastatus studentAttendStatus ON studentAttendStatus.Fid = attendEntry.Cfstudentstatusid

       LEFT JOIN ct_v3b_teacastatus teacherAttendStatus ON teacherAttendStatus.Fid = attend.cfattendstateid

···························································································································································