Select distinct case when BranchCourseId  is null then Tb_Client.ThreePhaseKind else BranchCourseId end BranchCourseId
, Tb_Client.* from Tb_Client
inner join Tb_Class_Client on Tb_Client.id = Tb_Class_Client.clientId
inner join Tb_Class on tb_class_client.classid = tb_class.id
inner join tb_course on tb_class.courseid = tb_course.id

posted on 2012-12-20 15:10  过往云烟  阅读(109)  评论(0编辑  收藏  举报