SELECT * FROM ( SELECT GY_YLSF.FYMC AS FYMC, GY_YLSF.FYDW AS FYDW, MS_YJ02.YLSL AS FYSL, MS_YJ02.YLDJ AS FYDJ, MS_YJ02.ZFBL AS ZFBL, (MS_YJ02.ZFBL * MS_YJ02.YLDJ * MS_YJ02.YLSL) as zje, ( MS_YJ02.YLDJ * MS_YJ02.YLSL) as zje1, GY_YGDM.YGXM AS YGXM, MS_YJ01.brxm as brxm, ms_mzxx.jzrq as jzrq, MS_YJ02.fygb as fygb, YYGH_GHJL.fzbz as fzbz, GY_YLSF.srfl as srfl, ms_brda.mzhm, MS_YJ01.ysdm, GY_YGDM.ygbh, ms_mzxx.sfrq, gy_ksdm.KSMC, MS_YJ01.BRXZ, MS_BRDA.BRID, (select dmmc from GY_YLSF a,GY_DMZD b where a.FYXH = GY_YLSF.FYXH and a.srfl = b.DMSB and b.DMLB = 1177 )sffl FROM MS_YJ02, GY_YLSF, MS_YJ01, GY_YGDM, gy_ksdm, ms_mzxx, ms_brda, YYGH_GHJL WHERE ( GY_YLSF.FYXH = MS_YJ02.YLXH ) AND ( MS_YJ01.YJXH = MS_YJ02.YJXH ) AND ( MS_YJ01.YSDM = GY_YGDM.YGDM ) AND (gy_ksdm.ksdm = MS_YJ01.ksdm )and ( ms_yj01.brid = ms_brda.brid )and ( ms_mzxx.ZFPB = 0 ) AND (ms_yj01.fphm = ms_mzxx.fphm) and (YYGH_GHJL.GHLSH = MS_YJ01.GHLSH) and ( MS_YJ01.FJLB IS NULL OR MS_YJ01.FJLB = 0 ) and (MS_YJ01.FPHM is not null )
时间: 2024-02-15 07:27:28 浏览: 135
SELECT 的另类用法
这是一个 SQL 查询语句,可能是用于查询医院的费用信息。它使用了多个表之间的关联条件,包括挂号记录、医技申请单、医生信息、科室信息、门诊信息等等。查询结果包括费用名称、单位、数量、单价、自负比例、总金额、医生姓名、病人姓名、结算日期、费用归并、费别、收入分类、门诊号码、医生代码、医工编号、收费日期、科室名称、病人性质、病人ID等信息。
阅读全文