欢迎来到梁良 | LonBlog,这里记录下了我生活点点滴滴。
posted on 2010-04-07 22:45 梁良 阅读(11234) 评论(3) 编辑 收藏 所属分类: 一滴一滴
谢谢! 回复 更多评论
SELECT DT.DOCTORNO AS DOCTORNO,DT.NAME AS DOCTORNAME,CF.HOSPITALNO AS HOSPITALNO,M.NAME AS 医疗结构,NVL(CFD.MONEY,0)-NVL(X.CRDMONEY,0) AS MONEY,NVL(CFD.ALLNUMBERS,0)-NVL(CRDALLNUMBERS,0) AS ALLNUMBERS,D.NAME AS DNAME,CF.DOCTORID AS DOCTORIDFROM CLINICFEE CFLEFT OUTER JOIN CLINICFEEDETAILS CFD ON CF.CLINICFEEID=CFD.CLINICFEEIDLEFT OUTER JOIN (SELECT NVL(CRD.MONEY,0) AS CRDMONEY,NVL(CRD.ALLNUMBERS,0) AS CRDALLNUMBERS,CR.PATIENTID AS PATIENTID,CRD.CLINICFEEDETAILSID AS CLINICFEEDETAILSID FROM CLINICRETURN CR,CLINICRETURNDETAILS CRD WHERE CR.CLINICRETURNID=CRD.CLINICRETURNID) X ON X.PATIENTID=CF.PATIENTID AND X.CLINICFEEDETAILSID=CFD.CLINICFEEDETAILSID,DRUG D,PATIENT P,DOCTOR DT,MEDICALINSTITUTION M WHERE D.DRUGID=CFD.DRUGID AND P.PATIENTID=CF.PATIENTID AND CF.DOCTORID=DT.DOCTORID AND CF.HOSPITALNO=M.HOSPITALNO AND M.HOSPITALNO=DT.HOSPITALNO 回复 更多评论
.; 回复 更多评论
Powered by: BlogJava Copyright © 梁良
Powered by: LonLeung Copyright © 梁良